@leafer/layout 1.0.0-beta.4 → 1.0.0-beta.6

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/layout",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "@leafer/layout",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,10 +19,10 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/math": "1.0.0-beta.4",
23
- "@leafer/platform": "1.0.0-beta.4"
22
+ "@leafer/math": "1.0.0-beta.6",
23
+ "@leafer/platform": "1.0.0-beta.6"
24
24
  },
25
25
  "devDependencies": {
26
- "@leafer/interface": "1.0.0-beta.4"
26
+ "@leafer/interface": "1.0.0-beta.6"
27
27
  }
28
28
  }
package/src/LeafLayout.ts CHANGED
@@ -74,14 +74,13 @@ export class LeafLayout implements ILeafLayout {
74
74
  }
75
75
 
76
76
 
77
- public checkUpdate(): void {
77
+ public checkUpdate(force?: boolean): void {
78
78
  const { leafer } = this.leaf
79
79
  if (leafer) {
80
80
  if (leafer.ready) {
81
- if (leafer.watcher.changed) leafer.layouter.layout()
81
+ if ((Platform.realtimeLayout || force) && leafer.watcher.changed) leafer.layouter.layout()
82
82
  } else {
83
83
  leafer.start()
84
- leafer.layouter.layout()
85
84
  }
86
85
  } else {
87
86
  let root = this.leaf