@leafer/layout 1.0.5 → 1.0.7

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.5",
3
+ "version": "1.0.7",
4
4
  "description": "@leafer/layout",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.0.5",
26
- "@leafer/helper": "1.0.5",
27
- "@leafer/platform": "1.0.5"
25
+ "@leafer/math": "1.0.7",
26
+ "@leafer/helper": "1.0.7",
27
+ "@leafer/platform": "1.0.7"
28
28
  },
29
29
  "devDependencies": {
30
- "@leafer/interface": "1.0.5"
30
+ "@leafer/interface": "1.0.7"
31
31
  }
32
32
  }
package/src/LeafLayout.ts CHANGED
@@ -117,11 +117,8 @@ export class LeafLayout implements ILeafLayout {
117
117
  public update(): void {
118
118
  const { leafer } = this.leaf
119
119
  if (leafer) {
120
- if (leafer.ready) {
121
- if (leafer.watcher.changed) leafer.layouter.layout()
122
- } else {
123
- leafer.start()
124
- }
120
+ if (leafer.ready) leafer.watcher.changed && leafer.layouter.layout()
121
+ else leafer.start()
125
122
  } else {
126
123
  let root = this.leaf
127
124
  while (root.parent && !root.parent.leafer) { root = root.parent }