@leafer/miniapp 2.1.9 → 2.1.10

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.
@@ -1256,6 +1256,7 @@ const BoundsHelper = {
1256
1256
  },
1257
1257
  copyAndSpread(t, bounds, spread, isShrink, side) {
1258
1258
  const {x: x, y: y, width: width, height: height} = bounds;
1259
+ if (!spread) spread = 0;
1259
1260
  if (isArray(spread)) {
1260
1261
  const four = fourNumber$1(spread);
1261
1262
  isShrink ? B.set(t, x + four[3], y + four[0], width - four[1] - four[3], height - four[2] - four[0]) : B.set(t, x - four[3], y - four[0], width + four[1] + four[3], height + four[2] + four[0]);
@@ -6984,7 +6985,7 @@ class LeafLevelList {
6984
6985
  }
6985
6986
  }
6986
6987
 
6987
- const version = "2.1.9";
6988
+ const version = "2.1.10";
6988
6989
 
6989
6990
  class LeaferCanvas extends LeaferCanvasBase {
6990
6991
  get allowBackgroundColor() {
@@ -14324,7 +14325,7 @@ class EditBox extends Group {
14324
14325
  } else if (editor.hasDimOthers) {
14325
14326
  editor.cancelDimOthers();
14326
14327
  }
14327
- if (editBoxType === "stroke") BoundsHelper.spread(bounds, editor.element.__layout.strokeBoxSpread);
14328
+ if (editBoxType === "stroke") BoundsHelper.spread(bounds, this.target.__layout.strokeBoxSpread);
14328
14329
  if (spread) BoundsHelper.spread(bounds, spread);
14329
14330
  if (this.view.worldOpacity) {
14330
14331
  const {width: width, height: height} = bounds;
@@ -15414,11 +15415,9 @@ let Editor = class Editor extends Group {
15414
15415
  unloadEditTool(onlyTool) {
15415
15416
  let tool = this.editTool;
15416
15417
  if (tool) {
15417
- if (!onlyTool) {
15418
- this.editBox.unload();
15419
- this.editTool = null;
15420
- }
15418
+ if (!onlyTool) this.editBox.unload();
15421
15419
  tool.unload();
15420
+ if (!onlyTool) this.editTool = null;
15422
15421
  tool.editTarget = null;
15423
15422
  }
15424
15423
  }