canvas-editor-engine 2.2.2 → 2.2.3

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 +8 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2528,7 +2528,14 @@ var DrawLayersService = function() {
2528
2528
  var _a;
2529
2529
  var layerName = layerOptions.layerName, painter = layerOptions.painter;
2530
2530
  var id = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
2531
- var name = layerName || painter ? "".concat(painter.drawType, "-").concat(painter.id) : "New Layer";
2531
+ var name = function() {
2532
+ if (layerName) return layerName;
2533
+ if (painter) {
2534
+ return "".concat(painter.drawType, "-").concat(painter.id);
2535
+ } else {
2536
+ return "New Layer";
2537
+ }
2538
+ }();
2532
2539
  var painters = painter ? [ painter ] : [];
2533
2540
  var sortedLayers = (_a = this.layerList) === null || _a === void 0 ? void 0 : _a.sort((function(a, b) {
2534
2541
  return a.order - b.order;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-editor-engine",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "CanvasEditorEngine library, use: [typescript] [canvas]",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",