@leafer-in/editor 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-in/editor",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "@leafer-in/editor",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -34,10 +34,10 @@
34
34
  "leaferjs"
35
35
  ],
36
36
  "peerDependencies": {
37
- "@leafer-ui/draw": "^2.1.9",
38
- "@leafer-ui/core": "^2.1.9",
39
- "@leafer-in/resize": "^2.1.9",
40
- "@leafer-ui/interface": "^2.1.9",
41
- "@leafer-in/interface": "^2.1.9"
37
+ "@leafer-ui/draw": "^2.1.10",
38
+ "@leafer-ui/core": "^2.1.10",
39
+ "@leafer-in/resize": "^2.1.10",
40
+ "@leafer-ui/interface": "^2.1.10",
41
+ "@leafer-in/interface": "^2.1.10"
42
42
  }
43
43
  }
package/src/Editor.ts CHANGED
@@ -199,11 +199,9 @@ export class Editor extends Group implements IEditor {
199
199
  public unloadEditTool(onlyTool?: boolean): void {
200
200
  let tool = this.editTool
201
201
  if (tool) {
202
- if (!onlyTool) {
203
- this.editBox.unload()
204
- this.editTool = null
205
- }
202
+ if (!onlyTool) this.editBox.unload()
206
203
  tool.unload()
204
+ if (!onlyTool) this.editTool = null
207
205
  tool.editTarget = null
208
206
  }
209
207
  }
@@ -179,7 +179,7 @@ export class EditBox extends Group implements IEditBox {
179
179
  editor.cancelDimOthers()
180
180
  }
181
181
 
182
- if (editBoxType === 'stroke') BoundsHelper.spread(bounds, editor.element.__layout.strokeBoxSpread)
182
+ if (editBoxType === 'stroke') BoundsHelper.spread(bounds, this.target.__layout.strokeBoxSpread)
183
183
  if (spread) BoundsHelper.spread(bounds, spread)
184
184
 
185
185
  if (this.view.worldOpacity) {