@leafer-ui/effect 1.3.2 → 1.4.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-ui/effect",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "@leafer-ui/effect",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,10 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.3.2"
25
+ "@leafer/core": "1.4.0",
26
+ "@leafer-ui/draw": "1.4.0"
26
27
  },
27
28
  "devDependencies": {
28
- "@leafer/interface": "1.3.2",
29
- "@leafer-ui/interface": "1.3.2"
29
+ "@leafer/interface": "1.4.0",
30
+ "@leafer-ui/interface": "1.4.0"
30
31
  }
31
32
  }
@@ -2,6 +2,7 @@ import { IBoundsData, ILeaferCanvas, IMatrixWithBoundsData, IOffsetBoundsData }
2
2
  import { BoundsHelper } from '@leafer/core'
3
3
 
4
4
  import { IUI, ICachedShape } from '@leafer-ui/interface'
5
+ import { ColorConvert } from '@leafer-ui/draw'
5
6
 
6
7
  import { drawWorldShadow } from './Shadow'
7
8
 
@@ -43,7 +44,7 @@ export function innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape
43
44
  copyBounds = bounds
44
45
  }
45
46
 
46
- other.fillWorld(copyBounds, item.color, 'source-in')
47
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in')
47
48
 
48
49
  if (ui.__worldFlipped) {
49
50
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode)
package/src/Shadow.ts CHANGED
@@ -2,6 +2,7 @@ import { IBoundsData, ILeaferCanvas, IMatrixWithBoundsData, IOffsetBoundsData }
2
2
  import { BoundsHelper, Platform } from '@leafer/core'
3
3
 
4
4
  import { IUI, ICachedShape } from '@leafer-ui/interface'
5
+ import { ColorConvert } from '@leafer-ui/draw'
5
6
 
6
7
 
7
8
  const { copy, toOffsetOutBounds } = BoundsHelper
@@ -23,7 +24,7 @@ export function shadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): vo
23
24
 
24
25
  shadow.forEach((item, index) => {
25
26
 
26
- other.setWorldShadow((offsetOutBounds.offsetX + item.x * scaleX), (offsetOutBounds.offsetY + item.y * scaleY), item.blur * scaleX, item.color)
27
+ other.setWorldShadow((offsetOutBounds.offsetX + item.x * scaleX), (offsetOutBounds.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color),)
27
28
 
28
29
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0
29
30