canvas-editor-engine 2.3.25 → 2.3.27
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
CHANGED
@@ -2576,7 +2576,7 @@ var DrawAccumulatorService = function() {
|
|
2576
2576
|
}
|
2577
2577
|
}, {
|
2578
2578
|
get: function(target, name) {
|
2579
|
-
return target;
|
2579
|
+
return target[name];
|
2580
2580
|
},
|
2581
2581
|
set: function(target, name, value) {
|
2582
2582
|
try {
|
@@ -2590,7 +2590,7 @@ var DrawAccumulatorService = function() {
|
|
2590
2590
|
return false;
|
2591
2591
|
} else {
|
2592
2592
|
var MIN_LENGTH = -1;
|
2593
|
-
var MAX_LENGTH = __spreadArray([], Object.keys(target), true);
|
2593
|
+
var MAX_LENGTH = __spreadArray([], Object.keys(target["value"]), true);
|
2594
2594
|
if (value <= Math.max.apply(Math, __spreadArray([ MIN_LENGTH ], MAX_LENGTH, false)) + 1) {
|
2595
2595
|
target["value"].length = value;
|
2596
2596
|
}
|
@@ -2617,7 +2617,7 @@ var DrawAccumulatorService = function() {
|
|
2617
2617
|
});
|
2618
2618
|
painter.drawService.bindOptions(drawType, options);
|
2619
2619
|
painter.drawService.tempCanvas.bindOptions(initialSize);
|
2620
|
-
this.painters.
|
2620
|
+
this.painters.push({
|
2621
2621
|
object: painter,
|
2622
2622
|
update: this.update.bind(this)
|
2623
2623
|
});
|
@@ -2631,11 +2631,11 @@ var DrawAccumulatorService = function() {
|
|
2631
2631
|
return __awaiter(this, void 0, void 0, (function() {
|
2632
2632
|
var painter;
|
2633
2633
|
return __generator(this, (function(_a) {
|
2634
|
-
painter = this.painters.
|
2634
|
+
painter = this.painters.find((function(painter) {
|
2635
2635
|
return painter.id === painterId;
|
2636
2636
|
}));
|
2637
2637
|
if (!!painter) {
|
2638
|
-
this.painters.
|
2638
|
+
this.painters.filter((function(painter) {
|
2639
2639
|
return painter.id !== painterId;
|
2640
2640
|
}));
|
2641
2641
|
}
|
@@ -2645,7 +2645,7 @@ var DrawAccumulatorService = function() {
|
|
2645
2645
|
}));
|
2646
2646
|
};
|
2647
2647
|
DrawAccumulatorService.prototype.renamePainter = function(painterId, name) {
|
2648
|
-
var painter = this.painters.
|
2648
|
+
var painter = this.painters.find((function(painter) {
|
2649
2649
|
return painter.id === painterId;
|
2650
2650
|
}));
|
2651
2651
|
if (painter) {
|
@@ -2663,7 +2663,7 @@ var DrawAccumulatorService = function() {
|
|
2663
2663
|
return __generator(this, (function(_a) {
|
2664
2664
|
useStore = smoothFilterOptions.useStore, options = smoothFilterOptions.options,
|
2665
2665
|
filterOptions = smoothFilterOptions.filterOptions;
|
2666
|
-
painter = this.painters.
|
2666
|
+
painter = this.painters.find((function(painter) {
|
2667
2667
|
return painter.id === painterId;
|
2668
2668
|
}));
|
2669
2669
|
if (!painter) return [ 2 ];
|
@@ -2697,7 +2697,7 @@ var DrawAccumulatorService = function() {
|
|
2697
2697
|
get: function() {
|
2698
2698
|
var _this = this;
|
2699
2699
|
var gradient = [];
|
2700
|
-
this.painters.
|
2700
|
+
this.painters.forEach((function(painter) {
|
2701
2701
|
var layer = _this.drawLayersService.layerList.find((function(layer) {
|
2702
2702
|
return layer.painters.includes(painter);
|
2703
2703
|
}));
|
@@ -2721,7 +2721,7 @@ var DrawAccumulatorService = function() {
|
|
2721
2721
|
var _this = this;
|
2722
2722
|
var stash = [];
|
2723
2723
|
this.gradient.forEach((function(order) {
|
2724
|
-
_this.painters.
|
2724
|
+
_this.painters.forEach((function(painter) {
|
2725
2725
|
var layer = _this.drawLayersService.layerList.find((function(layer) {
|
2726
2726
|
return layer.painters.includes(painter);
|
2727
2727
|
}));
|
@@ -12,10 +12,7 @@ export default class DrawAccumulatorService {
|
|
12
12
|
private appStoreRepository;
|
13
13
|
private eventService;
|
14
14
|
private drawLayersService;
|
15
|
-
painters:
|
16
|
-
value: Painter[];
|
17
|
-
filter: (callback: any) => void;
|
18
|
-
};
|
15
|
+
painters: Painter[];
|
19
16
|
constructor(appConfig: AppConfig, appStoreRepository: AppStoreRepository, eventService: EventService, drawLayersService: DrawLayersService);
|
20
17
|
add<DrawType extends TDrawType>(layerId: ILayer['id'], drawType: DrawType, options: DrawService['options'][DrawType], initialSize: ITempCanvasOptions): Promise<void>;
|
21
18
|
removePainter(painterId: string): Promise<void>;
|