@leafer/display 1.0.6 → 1.0.8

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/package.json +11 -11
  2. package/src/Leaf.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/display",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "@leafer/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,17 +22,17 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.0.6",
26
- "@leafer/data": "1.0.6",
27
- "@leafer/layout": "1.0.6",
28
- "@leafer/display-module": "1.0.6",
29
- "@leafer/event": "1.0.6",
30
- "@leafer/decorator": "1.0.6",
31
- "@leafer/helper": "1.0.6",
32
- "@leafer/debug": "1.0.6",
33
- "@leafer/platform": "1.0.6"
25
+ "@leafer/math": "1.0.8",
26
+ "@leafer/data": "1.0.8",
27
+ "@leafer/layout": "1.0.8",
28
+ "@leafer/display-module": "1.0.8",
29
+ "@leafer/event": "1.0.8",
30
+ "@leafer/decorator": "1.0.8",
31
+ "@leafer/helper": "1.0.8",
32
+ "@leafer/debug": "1.0.8",
33
+ "@leafer/platform": "1.0.8"
34
34
  },
35
35
  "devDependencies": {
36
- "@leafer/interface": "1.0.6"
36
+ "@leafer/interface": "1.0.8"
37
37
  }
38
38
  }
package/src/Leaf.ts CHANGED
@@ -662,9 +662,9 @@ export class Leaf implements ILeaf {
662
662
 
663
663
  public destroy(): void {
664
664
  if (!this.destroyed) {
665
- const { parent } = this
666
- if (parent) this.remove()
667
- if (this.children) (this as unknown as IBranch).removeAll(true)
665
+ if (this.parent) this.remove()
666
+ if (this.children) (this as unknown as IBranch).clear()
667
+
668
668
  this.__emitLifeEvent(ChildEvent.DESTROY)
669
669
 
670
670
  this.__.destroy()