@leafer-ui/effect 1.0.0-bate → 1.0.0-beta

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.0.0-bate",
3
+ "version": "1.0.0-beta",
4
4
  "description": "@leafer-ui/effect",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -2,8 +2,10 @@ import { IBoundsData, ILeaferCanvas, IMatrixWithBoundsData, IOffsetBoundsData }
2
2
  import { BoundsHelper } from '@leafer/core'
3
3
 
4
4
  import { IUI, ICachedShape } from '@leafer-ui/interface'
5
+
5
6
  import { drawWorldShadow } from './Shadow'
6
7
 
8
+
7
9
  const { toOffsetOutBounds } = BoundsHelper
8
10
  const offsetOutBounds = {} as IOffsetBoundsData
9
11
 
@@ -26,7 +28,7 @@ export function innerShadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape
26
28
 
27
29
  other.setWorldShadow((offsetOutBounds.offsetX + item.x * scaleX), (offsetOutBounds.offsetY + item.y * scaleY), item.blur * scaleX)
28
30
 
29
- spreadScale = item.spread ? 1 - item.spread * 2 / (__layout.boxBounds.width + (__layout.shapeStrokeSpread || 0) * 2) : 0
31
+ spreadScale = item.spread ? 1 - item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0
30
32
 
31
33
  drawWorldShadow(other, offsetOutBounds, spreadScale, shape)
32
34
 
package/src/Shadow.ts CHANGED
@@ -25,7 +25,7 @@ export function shadow(ui: IUI, current: ILeaferCanvas, shape: ICachedShape): vo
25
25
 
26
26
  other.setWorldShadow((offsetOutBounds.offsetX + item.x * scaleX), (offsetOutBounds.offsetY + item.y * scaleY), item.blur * scaleX, item.color)
27
27
 
28
- spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.shapeStrokeSpread || 0) * 2) : 0
28
+ spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0
29
29
 
30
30
  drawWorldShadow(other, offsetOutBounds, spreadScale, shape)
31
31