@leafer-ui/app 1.0.0-beta.8 → 1.0.0-beta.9
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 +7 -7
- package/src/App.ts +3 -3
- package/src/Leafer.ts +5 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/app",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.9",
|
|
4
4
|
"description": "@leafer-ui/app",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@leafer/core": "1.0.0-beta.
|
|
23
|
-
"@leafer-ui/display": "1.0.0-beta.
|
|
24
|
-
"@leafer-ui/type": "1.0.0-beta.
|
|
25
|
-
"@leafer-ui/data": "1.0.0-beta.
|
|
22
|
+
"@leafer/core": "1.0.0-beta.9",
|
|
23
|
+
"@leafer-ui/display": "1.0.0-beta.9",
|
|
24
|
+
"@leafer-ui/type": "1.0.0-beta.9",
|
|
25
|
+
"@leafer-ui/data": "1.0.0-beta.9"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@leafer/interface": "1.0.0-beta.
|
|
29
|
-
"@leafer-ui/interface": "1.0.0-beta.
|
|
28
|
+
"@leafer/interface": "1.0.0-beta.9",
|
|
29
|
+
"@leafer-ui/interface": "1.0.0-beta.9"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/App.ts
CHANGED
|
@@ -106,10 +106,10 @@ export class App extends Leafer implements IApp {
|
|
|
106
106
|
return config
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
public
|
|
110
|
-
this.children.forEach(leafer => { leafer.
|
|
109
|
+
public destroy(): void {
|
|
110
|
+
this.children.forEach(leafer => { leafer.destroy() })
|
|
111
111
|
this.children.length = 0
|
|
112
|
-
super.
|
|
112
|
+
super.destroy()
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
}
|
package/src/Leafer.ts
CHANGED
|
@@ -205,11 +205,7 @@ export class Leafer extends Group implements ILeafer {
|
|
|
205
205
|
}
|
|
206
206
|
if (!this.running) this.start()
|
|
207
207
|
check()
|
|
208
|
-
if (!this.viewLoaded) id = this.on_(
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
public receiveEvent(event: IObject): void {
|
|
212
|
-
if (this.interaction) this.interaction.receive(event)
|
|
208
|
+
if (!this.viewLoaded) id = this.on_(RenderEvent.AFTER, check)
|
|
213
209
|
}
|
|
214
210
|
|
|
215
211
|
protected __checkAutoLayout(config: ILeaferConfig): void {
|
|
@@ -287,7 +283,7 @@ export class Leafer extends Group implements ILeafer {
|
|
|
287
283
|
this.off_(this.__eventIds)
|
|
288
284
|
}
|
|
289
285
|
|
|
290
|
-
public
|
|
286
|
+
public destroy(): void {
|
|
291
287
|
if (this.canvas) {
|
|
292
288
|
try {
|
|
293
289
|
this.stop()
|
|
@@ -298,9 +294,9 @@ export class Leafer extends Group implements ILeafer {
|
|
|
298
294
|
this.__controllers.length = 0
|
|
299
295
|
|
|
300
296
|
this.selector.destroy()
|
|
301
|
-
this.canvasManager.
|
|
302
|
-
this.hitCanvasManager.
|
|
303
|
-
this.imageManager.
|
|
297
|
+
this.canvasManager.destroy()
|
|
298
|
+
this.hitCanvasManager.destroy()
|
|
299
|
+
this.imageManager.destroy()
|
|
304
300
|
|
|
305
301
|
this.canvas.destroy()
|
|
306
302
|
this.canvas = null
|