mathigon / euclid.js

2D Euclidean geometry classes, utilities, and drawing tools

Home Page:https://mathigon.io/euclid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

globalAlpha seems not to be restored properly after function call

HerrDerb opened this issue · comments

Bug

when calling e.g. drawCanvas with a opacity setting, the globalAlpha value of the context remains changed to that value after the method call.

Expected behaviour

The global alpha should not be altered by the method, or at least restored to the previouse value.

Workaround

      this.context.save();
      drawCanvas(this.context, geoElement, optionsWithOpacityValue);
      this.context.restore();