@leafer-ui/hit 1.0.0-alpha.21 → 1.0.0-alpha.23

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/UIHit.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/hit",
3
- "version": "1.0.0-alpha.21",
3
+ "version": "1.0.0-alpha.23",
4
4
  "description": "@leafer-ui/hit",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "devDependencies": {
22
- "@leafer/interface": "1.0.0-alpha.21",
23
- "@leafer-ui/interface": "1.0.0-alpha.21"
22
+ "@leafer/interface": "1.0.0-alpha.23",
23
+ "@leafer-ui/interface": "1.0.0-alpha.23"
24
24
  }
25
25
  }
package/src/UIHit.ts CHANGED
@@ -10,24 +10,24 @@ const strokeType = ['all', 'stroke']
10
10
 
11
11
  export const UIHit: IUIHitModule = {
12
12
 
13
- __hit(local: IRadiusPointData): boolean {
13
+ __hit(inner: IRadiusPointData): boolean {
14
14
  const { __hitCanvas: h } = this
15
15
 
16
16
  const { fill, hitType } = this.__
17
17
  const hitFill = (fill && fillVisibleType.includes(hitType)) || fillType.includes(hitType)
18
- if (hitFill && h.hitPath(local, this.__.windingRule)) return true
18
+ if (hitFill && h.hitFill(inner, this.__.windingRule)) return true
19
19
 
20
20
  const { stroke, __strokeOuterWidth: outerWidth } = this.__
21
21
  const hitStroke = (stroke && strokeVisibleType.includes(hitType)) || strokeType.includes(hitType)
22
22
  if (!hitFill && !hitStroke) return false
23
23
 
24
- const strokeWidth = ((hitStroke ? (outerWidth || 0) : 0) + local.radiusX) * 2
24
+ const strokeWidth = ((hitStroke ? (outerWidth || 0) : 0) + inner.radiusX) * 2
25
25
  if (h.strokeWidth !== strokeWidth) {
26
26
  h.strokeWidth = strokeWidth
27
27
  h.stroke()
28
28
  }
29
29
 
30
- return h.hitStroke(local)
30
+ return h.hitStroke(inner)
31
31
  }
32
32
 
33
33
  }