@leafer/layouter 1.0.0-alpha.10 → 1.0.0-alpha.21

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/layouter",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.21",
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-alpha.10",
23
- "@leafer/math": "1.0.0-alpha.10",
24
- "@leafer/list": "1.0.0-alpha.10",
25
- "@leafer/data": "1.0.0-alpha.10",
26
- "@leafer/helper": "1.0.0-alpha.10",
27
- "@leafer/debug": "1.0.0-alpha.10"
22
+ "@leafer/event": "1.0.0-alpha.21",
23
+ "@leafer/math": "1.0.0-alpha.21",
24
+ "@leafer/list": "1.0.0-alpha.21",
25
+ "@leafer/data": "1.0.0-alpha.21",
26
+ "@leafer/helper": "1.0.0-alpha.21",
27
+ "@leafer/debug": "1.0.0-alpha.21"
28
28
  },
29
29
  "devDependencies": {
30
- "@leafer/interface": "1.0.0-alpha.10"
30
+ "@leafer/interface": "1.0.0-alpha.21"
31
31
  }
32
32
  }
@@ -26,7 +26,7 @@ export class LayoutBlockData implements ILayoutBlockData {
26
26
 
27
27
  public setAfter(): void {
28
28
  setByListWithHandle(this.afterBounds, this.updatedList.list, worldBounds)
29
- this.__computeChange()
29
+ this.updatedBounds.setByList([this.beforeBounds, this.afterBounds])
30
30
  }
31
31
 
32
32
  public merge(data: ILayoutBlockData): void {
@@ -36,15 +36,6 @@ export class LayoutBlockData implements ILayoutBlockData {
36
36
  this.updatedBounds.add(data.updatedBounds)
37
37
  }
38
38
 
39
- protected __computeChange(): void {
40
- const { updatedBounds: changedBounds } = this
41
- changedBounds.setByList([this.beforeBounds, this.afterBounds])
42
- if (!changedBounds.isEmpty()) {
43
- changedBounds.spread(2)
44
- changedBounds.ceil()
45
- }
46
- }
47
-
48
39
  public destroy(): void {
49
40
  this.updatedList = null
50
41
  }
package/src/Layouter.ts CHANGED
@@ -93,7 +93,8 @@ export class Layouter implements ILayouter {
93
93
  updateBounds(this.__levelList)
94
94
  updateChange(updateList)
95
95
 
96
- blocks.forEach(item => { item.setAfter() })
96
+ blocks.forEach(item => item.setAfter())
97
+
97
98
  target.emitEvent(new LayoutEvent(ONCE, blocks))
98
99
  target.emitEvent(new LayoutEvent(AFTER_ONCE, blocks))
99
100