@leafer/display-module 1.9.6 → 1.9.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/display-module",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
4
4
  "description": "@leafer/display-module",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,13 +22,13 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/helper": "1.9.6",
26
- "@leafer/event": "1.9.6",
27
- "@leafer/math": "1.9.6",
28
- "@leafer/data": "1.9.6",
29
- "@leafer/debug": "1.9.6"
25
+ "@leafer/helper": "1.9.7",
26
+ "@leafer/event": "1.9.7",
27
+ "@leafer/math": "1.9.7",
28
+ "@leafer/data": "1.9.7",
29
+ "@leafer/debug": "1.9.7"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "1.9.6"
32
+ "@leafer/interface": "1.9.7"
33
33
  }
34
34
  }
@@ -25,8 +25,11 @@ export const BranchRender: IBranchRenderModule = {
25
25
 
26
26
  const data = this.__
27
27
 
28
- if (data.dim) options.dimOpacity = data.dim === true ? 0.2 : data.dim
29
- else if (data.dimskip) options.dimOpacity && (options.dimOpacity = 0)
28
+ if (data.__useDim) {
29
+ if (data.dim) options.dimOpacity = data.dim === true ? 0.2 : data.dim
30
+ else if (data.bright && !options.topRendering) return options.topList.add(this)
31
+ else if (data.dimskip) options.dimOpacity && (options.dimOpacity = 0)
32
+ }
30
33
 
31
34
  if (data.__single && !this.isBranchLeaf) { // Frame / Box 不能走 single 逻辑渲染组,需用 drawAfterFill 渲染成一个整体, 关联设置 BoxData.__drawAfterFill
32
35
 
package/src/LeafRender.ts CHANGED
@@ -13,6 +13,8 @@ export const LeafRender: ILeafRenderModule = {
13
13
 
14
14
  const data = this.__
15
15
 
16
+ if (data.bright && !options.topRendering) return options.topList.add(this)
17
+
16
18
  canvas.setWorld(this.__nowWorld = this.__getNowWorld(options))
17
19
  canvas.opacity = options.dimOpacity && !data.dimskip ? data.opacity * options.dimOpacity : data.opacity
18
20