@leafer/canvas-node 1.0.0-rc.9 → 1.0.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-node",
3
- "version": "1.0.0-rc.9",
3
+ "version": "1.0.0",
4
4
  "description": "@leafer/canvas-node",
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.0.0-rc.9"
25
+ "@leafer/core": "1.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.0.0-rc.9"
28
+ "@leafer/interface": "1.0.0"
29
29
  }
30
30
  }
@@ -3,8 +3,6 @@ import { LeaferCanvasBase, Platform, canvasPatch } from '@leafer/core'
3
3
 
4
4
  export class LeaferCanvas extends LeaferCanvasBase {
5
5
 
6
- declare public view: IObject
7
-
8
6
  public get allowBackgroundColor(): boolean { return true }
9
7
 
10
8
  public init(): void {
@@ -27,8 +25,8 @@ export class LeaferCanvas extends LeaferCanvasBase {
27
25
  public updateViewSize(): void {
28
26
  const { width, height, pixelRatio } = this
29
27
 
30
- this.view.width = width * pixelRatio
31
- this.view.height = height * pixelRatio
28
+ this.view.width = Math.ceil(width * pixelRatio)
29
+ this.view.height = Math.ceil(height * pixelRatio)
32
30
 
33
31
  this.clientBounds = this.bounds
34
32
  }
package/types/index.d.ts CHANGED
@@ -1,8 +1,6 @@
1
- import { IObject } from '@leafer/interface';
2
1
  import { LeaferCanvasBase } from '@leafer/core';
3
2
 
4
3
  declare class LeaferCanvas extends LeaferCanvasBase {
5
- view: IObject;
6
4
  get allowBackgroundColor(): boolean;
7
5
  init(): void;
8
6
  protected __createView(): void;