@leafer/display-module 2.1.2 → 2.1.3
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/LeafBounds.ts +34 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display-module",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
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": "2.1.
|
|
26
|
-
"@leafer/event": "2.1.
|
|
27
|
-
"@leafer/math": "2.1.
|
|
28
|
-
"@leafer/data": "2.1.
|
|
29
|
-
"@leafer/debug": "2.1.
|
|
25
|
+
"@leafer/helper": "2.1.3",
|
|
26
|
+
"@leafer/event": "2.1.3",
|
|
27
|
+
"@leafer/math": "2.1.3",
|
|
28
|
+
"@leafer/data": "2.1.3",
|
|
29
|
+
"@leafer/debug": "2.1.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "2.1.
|
|
32
|
+
"@leafer/interface": "2.1.3"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/LeafBounds.ts
CHANGED
|
@@ -41,8 +41,6 @@ export const LeafBounds: ILeafBoundsModule = {
|
|
|
41
41
|
|
|
42
42
|
this.__updateBoxBounds()
|
|
43
43
|
layout.resized = 'inner'
|
|
44
|
-
|
|
45
|
-
if (data.__strokeGeometry) data.__strokeGeometry = undefined
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
|
|
@@ -51,8 +49,8 @@ export const LeafBounds: ILeafBoundsModule = {
|
|
|
51
49
|
if (this.__local) this.__updateLocalBoxBounds()
|
|
52
50
|
layout.localBoxChanged = undefined
|
|
53
51
|
|
|
54
|
-
if (layout.strokeSpread) layout.strokeChanged = true
|
|
55
|
-
if (layout.renderSpread) layout.renderChanged = true
|
|
52
|
+
if (layout.strokeSpread && !layout.strokeChanged) layout.strokeChanged = layout.boxChanged ? true : 2
|
|
53
|
+
if (layout.renderSpread && !layout.renderChanged) layout.renderChanged = layout.boxChanged ? true : 2
|
|
56
54
|
if (this.parent) this.parent.__layout.boxChange()
|
|
57
55
|
}
|
|
58
56
|
|
|
@@ -62,42 +60,56 @@ export const LeafBounds: ILeafBoundsModule = {
|
|
|
62
60
|
|
|
63
61
|
if (layout.strokeChanged) {
|
|
64
62
|
|
|
65
|
-
layout.
|
|
66
|
-
|
|
67
|
-
if (layout.strokeSpread) {
|
|
68
|
-
|
|
69
|
-
if (layout.strokeBounds === layout.boxBounds) layout.spreadStroke()
|
|
63
|
+
if (layout.strokeChanged === 2) {
|
|
70
64
|
|
|
71
|
-
this.__updateStrokeBounds()
|
|
72
65
|
this.__updateLocalStrokeBounds()
|
|
73
66
|
|
|
74
67
|
} else {
|
|
75
|
-
|
|
68
|
+
|
|
69
|
+
layout.strokeSpread = this.__updateStrokeSpread()
|
|
70
|
+
|
|
71
|
+
if (layout.strokeSpread) {
|
|
72
|
+
|
|
73
|
+
if (layout.strokeBounds === layout.boxBounds) layout.spreadStroke()
|
|
74
|
+
|
|
75
|
+
this.__updateStrokeBounds()
|
|
76
|
+
this.__updateLocalStrokeBounds()
|
|
77
|
+
|
|
78
|
+
} else {
|
|
79
|
+
layout.spreadStrokeCancel()
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
layout.resized = 'inner'
|
|
83
|
+
if (layout.renderSpread || layout.strokeSpread !== layout.strokeBoxSpread) layout.renderChanged = true
|
|
76
84
|
}
|
|
77
85
|
|
|
78
86
|
layout.strokeChanged = undefined
|
|
79
|
-
if (layout.renderSpread || layout.strokeSpread !== layout.strokeBoxSpread) layout.renderChanged = true
|
|
80
87
|
|
|
81
88
|
if (this.parent) this.parent.__layout.strokeChange()
|
|
82
|
-
layout.resized = 'inner'
|
|
83
|
-
|
|
84
|
-
if (data.__strokeGeometry) data.__strokeGeometry = undefined
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
|
|
88
92
|
if (layout.renderChanged) {
|
|
89
93
|
|
|
90
|
-
layout.
|
|
91
|
-
|
|
92
|
-
if (layout.renderSpread) {
|
|
93
|
-
|
|
94
|
-
if (layout.renderBounds === layout.boxBounds || layout.renderBounds === layout.strokeBounds) layout.spreadRender()
|
|
94
|
+
if (layout.renderChanged === 2) {
|
|
95
95
|
|
|
96
|
-
this.__updateRenderBounds()
|
|
97
96
|
this.__updateLocalRenderBounds()
|
|
98
97
|
|
|
99
98
|
} else {
|
|
100
|
-
|
|
99
|
+
|
|
100
|
+
layout.renderSpread = this.__updateRenderSpread()
|
|
101
|
+
|
|
102
|
+
if (layout.renderSpread) {
|
|
103
|
+
|
|
104
|
+
if (layout.renderBounds === layout.boxBounds || layout.renderBounds === layout.strokeBounds) layout.spreadRender()
|
|
105
|
+
|
|
106
|
+
this.__updateRenderBounds()
|
|
107
|
+
this.__updateLocalRenderBounds()
|
|
108
|
+
|
|
109
|
+
} else {
|
|
110
|
+
layout.spreadRenderCancel()
|
|
111
|
+
}
|
|
112
|
+
|
|
101
113
|
}
|
|
102
114
|
|
|
103
115
|
layout.renderChanged = undefined
|