canvas-editor-engine 2.3.2 → 2.3.4
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 +7 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2123,12 +2123,16 @@ var VagueFilter = function(_super) {
|
|
2123
2123
|
var TempCanvas = function() {
|
2124
2124
|
function TempCanvas() {
|
2125
2125
|
this.canvas = document.createElement("canvas");
|
2126
|
-
this.ctx = this.canvas.getContext("2d"
|
2126
|
+
this.ctx = this.canvas.getContext("2d", {
|
2127
|
+
willReadFrequently: true
|
2128
|
+
});
|
2127
2129
|
}
|
2128
2130
|
TempCanvas.prototype.bindOptions = function(options) {
|
2129
2131
|
this.canvas.width = options.width;
|
2130
2132
|
this.canvas.height = options.height;
|
2131
|
-
this.ctx = this.canvas.getContext("2d"
|
2133
|
+
this.ctx = this.canvas.getContext("2d", {
|
2134
|
+
willReadFrequently: true
|
2135
|
+
});
|
2132
2136
|
};
|
2133
2137
|
TempCanvas.prototype.destroy = function() {
|
2134
2138
|
this.canvas.remove();
|
@@ -2249,7 +2253,7 @@ var DrawAccumulator = function() {
|
|
2249
2253
|
var layer = _this.drawLayersService.layerList.find((function(layer) {
|
2250
2254
|
return layer.painters.includes(painter);
|
2251
2255
|
}));
|
2252
|
-
if (!layer) return;
|
2256
|
+
if (!layer) return console.warn("[invoke] Layer not found");
|
2253
2257
|
if (!stash.includes(painter) && layer.order === order) {
|
2254
2258
|
_this.invokePainterWithTempCtx(painter.drawType, painter.drawService);
|
2255
2259
|
stash.push(painter);
|