@leafer/canvas 1.9.3 → 1.9.5

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",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
4
4
  "description": "@leafer/canvas",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,15 +22,15 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/file": "1.9.3",
26
- "@leafer/list": "1.9.3",
27
- "@leafer/math": "1.9.3",
28
- "@leafer/data": "1.9.3",
29
- "@leafer/path": "1.9.3",
30
- "@leafer/debug": "1.9.3",
31
- "@leafer/platform": "1.9.3"
25
+ "@leafer/file": "1.9.5",
26
+ "@leafer/list": "1.9.5",
27
+ "@leafer/math": "1.9.5",
28
+ "@leafer/data": "1.9.5",
29
+ "@leafer/path": "1.9.5",
30
+ "@leafer/debug": "1.9.5",
31
+ "@leafer/platform": "1.9.5"
32
32
  },
33
33
  "devDependencies": {
34
- "@leafer/interface": "1.9.3"
34
+ "@leafer/interface": "1.9.5"
35
35
  }
36
36
  }
@@ -103,18 +103,21 @@ export class LeaferCanvasBase extends Canvas implements ILeaferCanvas {
103
103
 
104
104
  this.bounds = new Bounds(0, 0, this.width, this.height)
105
105
 
106
- if (this.context && !this.unreal) {
107
- this.updateViewSize()
106
+ this.updateViewSize()
107
+ this.updateClientBounds()
108
+
109
+ if (this.context) {
110
+
108
111
  this.smooth = this.config.smooth
109
- }
110
112
 
111
- this.updateClientBounds()
113
+ if (!this.unreal && takeCanvas) {
114
+ this.clearWorld(takeCanvas.bounds)
115
+ this.copyWorld(takeCanvas)
116
+ takeCanvas.recycle()
117
+ }
112
118
 
113
- if (this.context && !this.unreal && takeCanvas) {
114
- this.clearWorld(takeCanvas.bounds)
115
- this.copyWorld(takeCanvas)
116
- takeCanvas.recycle()
117
119
  }
120
+
118
121
  }
119
122
 
120
123
  public updateViewSize(): void { }