canvas-editor-engine 2.3.60 → 2.3.62
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 +13 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2614,20 +2614,24 @@ var DrawLayersService = function() {
|
|
2614
2614
|
_this.layerList.sort((function(a, b) {
|
2615
2615
|
return a.order - b.order;
|
2616
2616
|
}));
|
2617
|
-
var
|
2617
|
+
var layerIdx_1 = _this.layerList.findIndex((function(layer) {
|
2618
2618
|
return layer.id === id;
|
2619
2619
|
}));
|
2620
|
-
var
|
2620
|
+
var replaceableIdx_1 = _this.layerList.findIndex((function(layer) {
|
2621
2621
|
return layer.order === newOrder;
|
2622
2622
|
}));
|
2623
|
-
_this.layerList
|
2624
|
-
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2628
|
-
|
2623
|
+
_this.layerList = _this.layerList.map((function(item, idx) {
|
2624
|
+
if (idx >= layerIdx_1 && idx <= replaceableIdx_1) {
|
2625
|
+
item.order -= 1;
|
2626
|
+
}
|
2627
|
+
return item;
|
2628
|
+
}));
|
2629
|
+
_this.layerList.forEach((function(item, idx) {
|
2630
|
+
if (idx > layerIdx_1 && idx <= replaceableIdx_1) {
|
2631
|
+
_this.appStoreRepository.store.drawLayersState.reduce("UPDATE_LAYER", item);
|
2632
|
+
}
|
2629
2633
|
}));
|
2630
|
-
_this.layerList[
|
2634
|
+
_this.layerList[layerIdx_1].order = newOrder;
|
2631
2635
|
_this.appStoreRepository.store.drawLayersState.reduce("UPDATE_LAYER", layer);
|
2632
2636
|
} else {
|
2633
2637
|
layer.order = newOrder;
|