@leafer/canvas-node 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/canvas-node",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "@leafer/canvas-node",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,9 +19,9 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/canvas": "1.0.0-beta.4"
22
+ "@leafer/canvas": "1.0.0-beta.6"
23
23
  },
24
24
  "devDependencies": {
25
- "@leafer/interface": "1.0.0-beta.4"
25
+ "@leafer/interface": "1.0.0-beta.6"
26
26
  }
27
27
  }
@@ -6,6 +6,8 @@ export class LeaferCanvas extends LeaferCanvasBase {
6
6
 
7
7
  public view: IObject
8
8
 
9
+ public get allowBackgroundColor(): boolean { return false }
10
+
9
11
  public init(): void {
10
12
 
11
13
  this.__createView()
@@ -23,8 +25,8 @@ export class LeaferCanvas extends LeaferCanvasBase {
23
25
  this.view = Platform.origin.createCanvas(this.width, this.height)
24
26
  }
25
27
 
26
- public setViewSize(size: IScreenSizeData): void {
27
- const { width, height, pixelRatio } = size
28
+ public updateViewSize(): void {
29
+ const { width, height, pixelRatio } = this
28
30
 
29
31
  this.view.width = width * pixelRatio
30
32
  this.view.height = height * pixelRatio