canvas-editor-engine 2.3.13 → 2.3.15
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.
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2251,7 +2251,6 @@ var DrawAccumulator = function() {
|
|
2251
2251
|
DrawAccumulator.prototype.invokePaintersOnLayers = function() {
|
2252
2252
|
var _this = this;
|
2253
2253
|
var stash = [];
|
2254
|
-
var ctx = this.appConfig.canvas.getContext("2d");
|
2255
2254
|
this.gradient.forEach((function(order) {
|
2256
2255
|
_this.painters.forEach((function(painter) {
|
2257
2256
|
var layer = _this.drawLayersService.layerList.find((function(layer) {
|
@@ -2259,7 +2258,7 @@ var DrawAccumulator = function() {
|
|
2259
2258
|
}));
|
2260
2259
|
if (!layer) return console.warn("[invoke] Layer not found");
|
2261
2260
|
if (!stash.includes(painter) && layer.order === order) {
|
2262
|
-
_this.invokePainterWithTempCtx(
|
2261
|
+
_this.invokePainterWithTempCtx(painter.drawType, painter.drawService);
|
2263
2262
|
stash.push(painter);
|
2264
2263
|
}
|
2265
2264
|
}));
|
@@ -2303,11 +2302,12 @@ var DrawAccumulator = function() {
|
|
2303
2302
|
}));
|
2304
2303
|
}));
|
2305
2304
|
};
|
2306
|
-
DrawAccumulator.prototype.invokePainterWithTempCtx = function(
|
2305
|
+
DrawAccumulator.prototype.invokePainterWithTempCtx = function(drawType, painter) {
|
2307
2306
|
return __awaiter(this, void 0, void 0, (function() {
|
2308
|
-
var imageData, x, y;
|
2307
|
+
var imageData, ctx, x, y;
|
2309
2308
|
return __generator(this, (function(_a) {
|
2310
2309
|
imageData = painter.tempCanvas.getImageData();
|
2310
|
+
ctx = this.appConfig.canvas.getContext("2d");
|
2311
2311
|
if (drawType === "image") {
|
2312
2312
|
x = painter.options.image.drawImageArgs.position.x;
|
2313
2313
|
y = painter.options.image.drawImageArgs.position.y;
|