@leafer/web 1.0.0-rc.5 → 1.0.0-rc.7

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.
Files changed (2) hide show
  1. package/package.json +7 -7
  2. package/src/index.ts +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/web",
3
- "version": "1.0.0-rc.5",
3
+ "version": "1.0.0-rc.7",
4
4
  "description": "@leafer/web",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,13 +22,13 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.0-rc.5",
26
- "@leafer/partner": "1.0.0-rc.5",
27
- "@leafer/canvas-web": "1.0.0-rc.5",
28
- "@leafer/interaction-web": "1.0.0-rc.5",
29
- "@leafer/image-web": "1.0.0-rc.5"
25
+ "@leafer/core": "1.0.0-rc.7",
26
+ "@leafer/partner": "1.0.0-rc.7",
27
+ "@leafer/canvas-web": "1.0.0-rc.7",
28
+ "@leafer/interaction-web": "1.0.0-rc.7",
29
+ "@leafer/image-web": "1.0.0-rc.7"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "1.0.0-rc.5"
32
+ "@leafer/interface": "1.0.0-rc.7"
33
33
  }
34
34
  }
package/src/index.ts CHANGED
@@ -53,7 +53,7 @@ export function useCanvas(_canvasType: ICanvasType, _power?: IObject): void {
53
53
  img.crossOrigin = 'anonymous'
54
54
  img.onload = () => { resolve(img) }
55
55
  img.onerror = (e) => { reject(e) }
56
- if (!src.startsWith('data:') && Platform.imageSuffix) src += (src.includes("?") ? "&" : "?") + Platform.imageSuffix
56
+ if (!src.startsWith('data:') && Platform.image.suffix) src += (src.includes("?") ? "&" : "?") + Platform.image.suffix
57
57
  img.src = src
58
58
  })
59
59
  }
@@ -72,8 +72,7 @@ export function useCanvas(_canvasType: ICanvasType, _power?: IObject): void {
72
72
  Platform.name = 'web'
73
73
  Platform.isMobile = 'ontouchstart' in window
74
74
  Platform.requestRender = function (render: IFunction): void { window.requestAnimationFrame(render) }
75
- Platform.devicePixelRatio = devicePixelRatio
76
- Platform.realtimeLayout = true
75
+ Platform.devicePixelRatio = Math.max(1, devicePixelRatio)
77
76
 
78
77
 
79
78
  // same as worker