@leafer/web 1.0.0-alpha.30 → 1.0.0-alpha.31

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 +6 -6
  2. package/src/index.ts +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/web",
3
- "version": "1.0.0-alpha.30",
3
+ "version": "1.0.0-alpha.31",
4
4
  "description": "@leafer/web",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,12 +19,12 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/core": "1.0.0-alpha.30",
23
- "@leafer/canvas-web": "1.0.0-alpha.30",
24
- "@leafer/interaction-web": "1.0.0-alpha.30",
25
- "@leafer/image-web": "1.0.0-alpha.30"
22
+ "@leafer/core": "1.0.0-alpha.31",
23
+ "@leafer/canvas-web": "1.0.0-alpha.31",
24
+ "@leafer/interaction-web": "1.0.0-alpha.31",
25
+ "@leafer/image-web": "1.0.0-alpha.31"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.0.0-alpha.30"
28
+ "@leafer/interface": "1.0.0-alpha.31"
29
29
  }
30
30
  }
package/src/index.ts CHANGED
@@ -23,7 +23,12 @@ Object.assign(Creator, {
23
23
 
24
24
  Platform.requestRender = function (render: IFunction): void { window.requestAnimationFrame(render) }
25
25
  Platform.canvas = Creator.canvas()
26
+ Platform.conicGradientSupport = !!Platform.canvas.context.createConicGradient
26
27
 
27
- if (navigator.userAgent.indexOf("Firefox") > -1) {
28
+ const { userAgent } = navigator
29
+
30
+ if (userAgent.indexOf("Firefox") > -1) {
28
31
  Platform.conicGradientRotate90 = true
29
- }
32
+ } else if (userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") === -1) {
33
+ Platform.fullImageShadow = true
34
+ }