euclid.js icon indicating copy to clipboard operation
euclid.js copied to clipboard

globalAlpha seems not to be restored properly after function call

Open HerrDerb opened this issue 1 year ago • 0 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();

HerrDerb avatar May 14 '24 13:05 HerrDerb