canvas-editor-engine 2.3.53 → 2.3.54

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.
Files changed (2) hide show
  1. package/dist/index.mjs +10 -8
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2570,17 +2570,19 @@ var DrawLayersService = function() {
2570
2570
  break;
2571
2571
 
2572
2572
  case "front":
2573
- var mostMax = _this.layerList.sort((function(a, b) {
2574
- return a.order - b.order;
2575
- }))[0];
2576
- newOrder = mostMax.order;
2573
+ var mostMax_1 = 0;
2574
+ _this.layerList.forEach((function(l) {
2575
+ return l.order > mostMax_1 ? mostMax_1 = l.order : null;
2576
+ }));
2577
+ newOrder = mostMax_1;
2577
2578
  break;
2578
2579
 
2579
2580
  case "back":
2580
- var mostMin = _this.layerList.sort((function(a, b) {
2581
- return b.order - a.order;
2582
- }))[0];
2583
- newOrder = mostMin.order;
2581
+ var mostMin_1 = Infinity;
2582
+ _this.layerList.forEach((function(l) {
2583
+ return l.order < mostMin_1 ? mostMin_1 = l.order : null;
2584
+ }));
2585
+ newOrder = mostMin_1;
2584
2586
  break;
2585
2587
  }
2586
2588
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-editor-engine",
3
- "version": "2.3.53",
3
+ "version": "2.3.54",
4
4
  "description": "CanvasEditorEngine library, use: [typescript] [canvas]",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",