canvas-editor-engine 2.3.65 → 2.3.67
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 +15 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2620,12 +2620,21 @@ var DrawLayersService = function() {
|
|
2620
2620
|
var replaceableIdx_1 = _this.layerList.findIndex((function(layer) {
|
2621
2621
|
return layer.order === newOrder;
|
2622
2622
|
}));
|
2623
|
-
|
2624
|
-
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2628
|
-
|
2623
|
+
if (_this.layerList[layerIdx_1].order > newOrder) {
|
2624
|
+
_this.layerList = _this.layerList.map((function(item, idx) {
|
2625
|
+
if (idx >= layerIdx_1 && idx <= replaceableIdx_1) {
|
2626
|
+
item.order -= 1;
|
2627
|
+
}
|
2628
|
+
return item;
|
2629
|
+
}));
|
2630
|
+
} else {
|
2631
|
+
_this.layerList = _this.layerList.map((function(item, idx) {
|
2632
|
+
if (idx >= replaceableIdx_1 && idx <= layerIdx_1) {
|
2633
|
+
item.order += 1;
|
2634
|
+
}
|
2635
|
+
return item;
|
2636
|
+
}));
|
2637
|
+
}
|
2629
2638
|
_this.layerList.forEach((function(item, idx) {
|
2630
2639
|
if (idx >= layerIdx_1 && idx <= replaceableIdx_1) {
|
2631
2640
|
_this.appStoreRepository.store.drawLayersState.reduce("UPDATE_LAYER", item);
|