@leafer/canvas 1.0.0 → 1.0.1

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.0.0",
3
+ "version": "1.0.1",
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.0.0",
26
- "@leafer/list": "1.0.0",
27
- "@leafer/math": "1.0.0",
28
- "@leafer/data": "1.0.0",
29
- "@leafer/path": "1.0.0",
30
- "@leafer/debug": "1.0.0",
31
- "@leafer/platform": "1.0.0"
25
+ "@leafer/file": "1.0.1",
26
+ "@leafer/list": "1.0.1",
27
+ "@leafer/math": "1.0.1",
28
+ "@leafer/data": "1.0.1",
29
+ "@leafer/path": "1.0.1",
30
+ "@leafer/debug": "1.0.1",
31
+ "@leafer/platform": "1.0.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@leafer/interface": "1.0.0"
34
+ "@leafer/interface": "1.0.1"
35
35
  }
36
36
  }
@@ -100,7 +100,7 @@ export class LeaferCanvasBase extends Canvas implements ILeaferCanvas {
100
100
 
101
101
  this.bounds = new Bounds(0, 0, this.width, this.height)
102
102
 
103
- if (!this.unreal) {
103
+ if (this.context && !this.unreal) {
104
104
  this.updateViewSize()
105
105
  this.smooth = this.config.smooth
106
106
  }
@@ -310,7 +310,7 @@ export class LeaferCanvasBase extends Canvas implements ILeaferCanvas {
310
310
  }
311
311
  }
312
312
 
313
- public updateRender(): void { }
313
+ public updateRender(_bounds?: IBoundsData): void { }
314
314
 
315
315
  public unrealCanvas(): void { }
316
316
 
package/types/index.d.ts CHANGED
@@ -140,7 +140,7 @@ declare class LeaferCanvasBase extends Canvas implements ILeaferCanvas {
140
140
  isSameSize(size: IScreenSizeData): boolean;
141
141
  getSameCanvas(useSameWorldTransform?: boolean, useSameSmooth?: boolean): ILeaferCanvas;
142
142
  recycle(clearBounds?: IBoundsData): void;
143
- updateRender(): void;
143
+ updateRender(_bounds?: IBoundsData): void;
144
144
  unrealCanvas(): void;
145
145
  destroy(): void;
146
146
  }