@leafer-ui/bounds 2.0.2 → 2.0.4

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 +3 -3
  2. package/src/UIBounds.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/bounds",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "@leafer-ui/bounds",
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": "2.0.2"
25
+ "@leafer/core": "2.0.4"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer-ui/interface": "2.0.2"
28
+ "@leafer-ui/interface": "2.0.4"
29
29
  }
30
30
  }
package/src/UIBounds.ts CHANGED
@@ -16,7 +16,7 @@ export const UIBounds: IUIBoundsModule = {
16
16
  if ((data.stroke || data.hitStroke === 'all') && strokeWidth && strokeAlign !== 'inside') {
17
17
  boxSpread = spread = strokeAlign === 'center' ? strokeWidth / 2 : strokeWidth
18
18
 
19
- if (!data.__boxStroke) {
19
+ if (!data.__boxStroke || data.__useArrow) {
20
20
  const miterLimitAddWidth = data.__isLinePath ? 0 : 10 * spread // = Math.sin((miterLimit = 10) * OneRadian / 2) * Math.sqrt(strokeWidth) - width 后期需继续精确优化
21
21
  const storkeCapAddWidth = data.strokeCap === 'none' ? 0 : strokeWidth
22
22
  spread += Math.max(miterLimitAddWidth, storkeCapAddWidth)