@leafer-ui/data 2.0.2 → 2.0.4
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 +5 -5
- package/src/StarData.ts +1 -1
- package/src/UIData.ts +9 -6
- package/types/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/data",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "@leafer-ui/data",
|
|
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": "2.0.
|
|
26
|
-
"@leafer-ui/external": "2.0.
|
|
25
|
+
"@leafer/core": "2.0.4",
|
|
26
|
+
"@leafer-ui/external": "2.0.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@leafer/interface": "2.0.
|
|
30
|
-
"@leafer-ui/interface": "2.0.
|
|
29
|
+
"@leafer/interface": "2.0.4",
|
|
30
|
+
"@leafer-ui/interface": "2.0.4"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/StarData.ts
CHANGED
package/src/UIData.ts
CHANGED
|
@@ -140,15 +140,18 @@ export class UIData extends LeafData implements IUIData {
|
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
public __getRealStrokeWidth(childStyle?: IStrokeComputedStyle): number {
|
|
143
|
-
let { strokeWidth,
|
|
143
|
+
let { strokeWidth, strokeScaleFixed } = this as IUIData
|
|
144
144
|
if (childStyle) {
|
|
145
145
|
if (childStyle.strokeWidth) strokeWidth = childStyle.strokeWidth
|
|
146
|
-
if (!isUndefined(childStyle.
|
|
146
|
+
if (!isUndefined(childStyle.strokeScaleFixed)) strokeScaleFixed = childStyle.strokeScaleFixed
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
|
|
149
|
+
if (strokeScaleFixed) {
|
|
150
|
+
const { scaleX } = this.__leaf.getRenderScaleData(true, strokeScaleFixed, false)
|
|
151
|
+
if (scaleX !== 1) return strokeWidth * scaleX
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return strokeWidth
|
|
152
155
|
}
|
|
153
156
|
|
|
154
157
|
|
package/types/index.d.ts
CHANGED