canvas-editor-engine 2.3.4 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -4
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2248,6 +2248,7 @@ var DrawAccumulator = function() {
2248
2248
  DrawAccumulator.prototype.invokePaintersOnLayers = function() {
2249
2249
  var _this = this;
2250
2250
  var stash = [];
2251
+ var ctx = this.appConfig.canvas.getContext("2d");
2251
2252
  this.gradient.forEach((function(order) {
2252
2253
  _this.painters.forEach((function(painter) {
2253
2254
  var layer = _this.drawLayersService.layerList.find((function(layer) {
@@ -2255,7 +2256,7 @@ var DrawAccumulator = function() {
2255
2256
  }));
2256
2257
  if (!layer) return console.warn("[invoke] Layer not found");
2257
2258
  if (!stash.includes(painter) && layer.order === order) {
2258
- _this.invokePainterWithTempCtx(painter.drawType, painter.drawService);
2259
+ _this.invokePainterWithTempCtx(ctx, painter.drawType, painter.drawService);
2259
2260
  stash.push(painter);
2260
2261
  }
2261
2262
  }));
@@ -2299,12 +2300,11 @@ var DrawAccumulator = function() {
2299
2300
  }));
2300
2301
  }));
2301
2302
  };
2302
- DrawAccumulator.prototype.invokePainterWithTempCtx = function(drawType, painter) {
2303
+ DrawAccumulator.prototype.invokePainterWithTempCtx = function(ctx, drawType, painter) {
2303
2304
  return __awaiter(this, void 0, void 0, (function() {
2304
- var imageData, ctx, x, y;
2305
+ var imageData, x, y;
2305
2306
  return __generator(this, (function(_a) {
2306
2307
  imageData = painter.tempCanvas.getImageData();
2307
- ctx = this.appConfig.canvas.getContext("2d");
2308
2308
  if (drawType === "image") {
2309
2309
  x = painter.options.image.drawImageArgs.position.x;
2310
2310
  y = painter.options.image.drawImageArgs.position.y;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-editor-engine",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "CanvasEditorEngine library, use: [typescript] [canvas]",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",