@leafer-ui/mask 1.6.7 → 1.8.0

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/index.ts +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/mask",
3
- "version": "1.6.7",
3
+ "version": "1.8.0",
4
4
  "description": "@leafer-ui/mask",
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.6.7",
26
- "@leafer-ui/draw": "1.6.7"
25
+ "@leafer/core": "1.8.0",
26
+ "@leafer-ui/draw": "1.8.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "1.6.7",
30
- "@leafer-ui/interface": "1.6.7"
29
+ "@leafer/interface": "1.8.0",
30
+ "@leafer-ui/interface": "1.8.0"
31
31
  }
32
32
  }
package/src/index.ts CHANGED
@@ -49,11 +49,13 @@ Group.prototype.__renderMask = function (canvas: ILeaferCanvas, options: IRender
49
49
 
50
50
  }
51
51
 
52
- if (!(mask === 'clipping' || mask === 'clipping-path')) continue
52
+ if (mask === 'clipping' || mask === 'clipping-path') excludeRenderBounds(child, options) || child.__render(canvas, options) // 渲染自身到原画布中,不应用遮罩
53
+
54
+ continue
53
55
  }
54
56
 
55
- if (excludeRenderBounds(child, options)) continue
56
- child.__render(contentCanvas || canvas, options)
57
+ excludeRenderBounds(child, options) || child.__render(contentCanvas || canvas, options)
58
+
57
59
  }
58
60
 
59
61
  maskEnd(this, currentMask, canvas, contentCanvas, maskCanvas, maskOpacity)