@leafer/layouter 1.0.0-rc.9 → 1.0.1
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 +5 -5
- package/src/Layouter.ts +5 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/layouter",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "@leafer/
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "@leafer/layouter",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.ts",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "https://github.com/leaferjs/leafer.git"
|
|
17
17
|
},
|
|
18
|
-
"homepage": "https://github.com/leaferjs/leafer/tree/main/packages/
|
|
18
|
+
"homepage": "https://github.com/leaferjs/leafer/tree/main/packages/partner/layouter",
|
|
19
19
|
"bugs": "https://github.com/leaferjs/leafer/issues",
|
|
20
20
|
"keywords": [
|
|
21
21
|
"leafer",
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.0.
|
|
25
|
+
"@leafer/core": "1.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@leafer/interface": "1.0.
|
|
28
|
+
"@leafer/interface": "1.0.1"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/Layouter.ts
CHANGED
|
@@ -163,9 +163,11 @@ export class Layouter implements ILayouter {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
public addExtra(leaf: ILeaf): void {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
if (!this.__updatedList.has(leaf)) {
|
|
167
|
+
const { updatedList, beforeBounds } = this.extraBlock || (this.extraBlock = new LayoutBlockData([]))
|
|
168
|
+
updatedList.length ? beforeBounds.add(leaf.__world) : beforeBounds.set(leaf.__world)
|
|
169
|
+
updatedList.add(leaf)
|
|
170
|
+
}
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
public createBlock(data: ILeafList | ILeaf[]): ILayoutBlockData {
|