@leafer-ui/hit 1.9.10 → 1.9.11

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 +5 -5
  2. package/src/UIHit.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/hit",
3
- "version": "1.9.10",
3
+ "version": "1.9.11",
4
4
  "description": "@leafer-ui/hit",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.9.10",
26
- "@leafer-ui/draw": "1.9.10"
25
+ "@leafer/core": "1.9.11",
26
+ "@leafer-ui/draw": "1.9.11"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "1.9.10",
30
- "@leafer-ui/interface": "1.9.10"
29
+ "@leafer/interface": "1.9.11",
30
+ "@leafer-ui/interface": "1.9.11"
31
31
  }
32
32
  }
package/src/UIHit.ts CHANGED
@@ -10,10 +10,10 @@ ui.__updateHitCanvas = function (): void {
10
10
 
11
11
  if (this.__box) this.__box.__updateHitCanvas()
12
12
 
13
- const leafer = this.leafer || (this.parent && this.parent.leafer) // 兼容 boxStyle
14
- if (!leafer) return
13
+ const { hitCanvasManager } = this.leafer || (this.parent && this.parent.leafer) || {}// 兼容 boxStyle
14
+ if (!hitCanvasManager) return
15
15
 
16
- const data = this.__, { hitCanvasManager } = leafer
16
+ const data = this.__
17
17
  const isHitPixelFill = (data.__isAlphaPixelFill || data.__isCanvas) && data.hitFill === 'pixel'
18
18
  const isHitPixelStroke = data.__isAlphaPixelStroke && data.hitStroke === 'pixel'
19
19
  const isHitPixel = isHitPixelFill || isHitPixelStroke