@leafer-ui/hit 1.0.0-alpha.7 → 1.0.0-alpha.9

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.7",
3
+ "version": "1.0.0-alpha.9",
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.7",
23
- "@leafer-ui/interface": "1.0.0-alpha.7"
22
+ "@leafer/interface": "1.0.0-alpha.9",
23
+ "@leafer-ui/interface": "1.0.0-alpha.9"
24
24
  }
25
25
  }
package/src/UIHit.ts CHANGED
@@ -5,13 +5,13 @@ import { IUIHitModule } from '@leafer-ui/interface'
5
5
 
6
6
  export const UIHit: IUIHitModule = {
7
7
 
8
- __hit(innerPoint: IRadiusPointData): boolean {
8
+ __hit(local: IRadiusPointData): boolean {
9
9
 
10
10
  if (this.__.fill) {
11
- if (this.__hitCanvas.hitPath(innerPoint, this.__.windingRule)) return true
11
+ if (this.__hitCanvas.hitPath(local, this.__.windingRule)) return true
12
12
  }
13
13
 
14
- const strokeWidth = ((this.__.__strokeOuterWidth || 0) + innerPoint.radiusX) * 2
14
+ const strokeWidth = ((this.__.__strokeOuterWidth || 0) + local.radiusX) * 2
15
15
 
16
16
  if (strokeWidth) {
17
17
  const { __hitCanvas: c } = this
@@ -19,7 +19,7 @@ export const UIHit: IUIHitModule = {
19
19
  c.strokeWidth = strokeWidth
20
20
  c.stroke()
21
21
  }
22
- if (c.hitStroke(innerPoint)) return true
22
+ if (c.hitStroke(local)) return true
23
23
  }
24
24
 
25
25
  return false