@leafer/canvas-web 1.2.1 → 1.3.0

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/canvas-web",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "@leafer/canvas-web",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,9 +22,9 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.2.1"
25
+ "@leafer/core": "1.3.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.2.1"
28
+ "@leafer/interface": "1.3.0"
29
29
  }
30
30
  }
@@ -119,7 +119,7 @@ export class LeaferCanvas extends LeaferCanvasBase {
119
119
  }
120
120
 
121
121
  public updateClientBounds(): void {
122
- this.clientBounds = this.view.getBoundingClientRect()
122
+ if (this.view.parentElement) this.clientBounds = this.view.getBoundingClientRect()
123
123
  }
124
124
 
125
125
  public startAutoLayout(autoBounds: IAutoBounds, listener: IResizeEventListener): void {