canvas-editor-engine 2.3.41 → 2.3.42
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 +16 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2635,7 +2635,7 @@ var DrawAccumulatorService = function() {
|
|
2635
2635
|
};
|
2636
2636
|
DrawAccumulatorService.prototype.removePainter = function(painterId) {
|
2637
2637
|
return __awaiter(this, void 0, void 0, (function() {
|
2638
|
-
var painter, filteredPainters;
|
2638
|
+
var painter, filteredPainters, len;
|
2639
2639
|
var _this = this;
|
2640
2640
|
return __generator(this, (function(_a) {
|
2641
2641
|
painter = this.painters.find((function(painter) {
|
@@ -2646,11 +2646,21 @@ var DrawAccumulatorService = function() {
|
|
2646
2646
|
return painter.id !== painterId;
|
2647
2647
|
}));
|
2648
2648
|
this.painters = createDynamicPainterStore();
|
2649
|
-
filteredPainters.
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
|
2649
|
+
len = filteredPainters === null || filteredPainters === void 0 ? void 0 : filteredPainters.length;
|
2650
|
+
filteredPainters.forEach((function(painter, index) {
|
2651
|
+
if (len - 1 === index) {
|
2652
|
+
_this.painters.push({
|
2653
|
+
object: painter,
|
2654
|
+
update: _this.update.bind(_this)
|
2655
|
+
});
|
2656
|
+
} else {
|
2657
|
+
_this.painters.push({
|
2658
|
+
object: painter,
|
2659
|
+
update: function() {
|
2660
|
+
return undefined;
|
2661
|
+
}
|
2662
|
+
});
|
2663
|
+
}
|
2654
2664
|
}));
|
2655
2665
|
this.drawLayersService.removePainter(painterId);
|
2656
2666
|
this.update();
|