@leafer/display-module 1.9.6 → 1.9.8
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 +7 -7
- package/src/BranchRender.ts +5 -2
- package/src/LeafBounds.ts +3 -2
- package/src/LeafRender.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display-module",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.8",
|
|
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.
|
|
26
|
-
"@leafer/event": "1.9.
|
|
27
|
-
"@leafer/math": "1.9.
|
|
28
|
-
"@leafer/data": "1.9.
|
|
29
|
-
"@leafer/debug": "1.9.
|
|
25
|
+
"@leafer/helper": "1.9.8",
|
|
26
|
+
"@leafer/event": "1.9.8",
|
|
27
|
+
"@leafer/math": "1.9.8",
|
|
28
|
+
"@leafer/data": "1.9.8",
|
|
29
|
+
"@leafer/debug": "1.9.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "1.9.
|
|
32
|
+
"@leafer/interface": "1.9.8"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/BranchRender.ts
CHANGED
|
@@ -25,8 +25,11 @@ export const BranchRender: IBranchRenderModule = {
|
|
|
25
25
|
|
|
26
26
|
const data = this.__
|
|
27
27
|
|
|
28
|
-
if (data.
|
|
29
|
-
|
|
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/LeafBounds.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { BoundsHelper } from '@leafer/math'
|
|
|
3
3
|
import { PathBounds } from '@leafer/path'
|
|
4
4
|
import { BranchHelper, LeafHelper } from '@leafer/helper'
|
|
5
5
|
import { BoundsEvent } from '@leafer/event'
|
|
6
|
+
import { isNumber } from '@leafer/data'
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
const { updateMatrix, updateAllMatrix } = LeafHelper
|
|
@@ -172,8 +173,8 @@ export const LeafBounds: ILeafBoundsModule = {
|
|
|
172
173
|
},
|
|
173
174
|
|
|
174
175
|
__updateRenderBounds(_bounds?: IBoundsData): void {
|
|
175
|
-
const layout = this.__layout
|
|
176
|
-
|
|
176
|
+
const layout = this.__layout, { renderSpread } = layout
|
|
177
|
+
isNumber(renderSpread) && renderSpread <= 0 ? copy(layout.renderBounds, layout.strokeBounds) : copyAndSpread(layout.renderBounds, layout.boxBounds, renderSpread) // Box use -1
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
}
|
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
|
|