@leafer/layouter 1.0.0-beta.6 → 1.0.0-beta.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.
- package/package.json +8 -8
- package/src/Layouter.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/layouter",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.8",
|
|
4
4
|
"description": "@leafer/canvas",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@leafer/event": "1.0.0-beta.
|
|
23
|
-
"@leafer/math": "1.0.0-beta.
|
|
24
|
-
"@leafer/list": "1.0.0-beta.
|
|
25
|
-
"@leafer/data": "1.0.0-beta.
|
|
26
|
-
"@leafer/helper": "1.0.0-beta.
|
|
27
|
-
"@leafer/debug": "1.0.0-beta.
|
|
22
|
+
"@leafer/event": "1.0.0-beta.8",
|
|
23
|
+
"@leafer/math": "1.0.0-beta.8",
|
|
24
|
+
"@leafer/list": "1.0.0-beta.8",
|
|
25
|
+
"@leafer/data": "1.0.0-beta.8",
|
|
26
|
+
"@leafer/helper": "1.0.0-beta.8",
|
|
27
|
+
"@leafer/debug": "1.0.0-beta.8"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@leafer/interface": "1.0.0-beta.
|
|
30
|
+
"@leafer/interface": "1.0.0-beta.8"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/Layouter.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class Layouter implements ILayouter {
|
|
|
30
30
|
|
|
31
31
|
public config: ILayouterConfig = {}
|
|
32
32
|
|
|
33
|
-
protected
|
|
33
|
+
protected __updatedList: ILeafList
|
|
34
34
|
protected __levelList: LeafLevelList = new LeafLevelList()
|
|
35
35
|
protected __eventIds: IEventListenerId[]
|
|
36
36
|
|
|
@@ -107,10 +107,10 @@ export class Layouter implements ILayouter {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
public partLayout(): void {
|
|
110
|
-
if (!this.
|
|
110
|
+
if (!this.__updatedList?.length) return
|
|
111
111
|
|
|
112
112
|
const t = Run.start('PartLayout')
|
|
113
|
-
const { target,
|
|
113
|
+
const { target, __updatedList: updateList } = this
|
|
114
114
|
const { BEFORE, LAYOUT, AFTER } = LayoutEvent
|
|
115
115
|
|
|
116
116
|
const blocks = this.getBlocks(updateList)
|
|
@@ -130,7 +130,7 @@ export class Layouter implements ILayouter {
|
|
|
130
130
|
this.addBlocks(blocks)
|
|
131
131
|
|
|
132
132
|
this.__levelList.reset()
|
|
133
|
-
this.
|
|
133
|
+
this.__updatedList = null
|
|
134
134
|
Run.end(t)
|
|
135
135
|
|
|
136
136
|
}
|
|
@@ -184,7 +184,7 @@ export class Layouter implements ILayouter {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
protected __onReceiveWatchData(event: WatchEvent): void {
|
|
187
|
-
this.
|
|
187
|
+
this.__updatedList = event.data.updatedList
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
protected __listenEvents(): void {
|