@leafer-ui/data 1.6.6 → 1.7.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.
- package/package.json +5 -5
- package/src/UIData.ts +1 -4
- package/types/index.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/data",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
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": "1.
|
|
26
|
-
"@leafer-ui/external": "1.
|
|
25
|
+
"@leafer/core": "1.7.0",
|
|
26
|
+
"@leafer-ui/external": "1.7.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@leafer/interface": "1.
|
|
30
|
-
"@leafer-ui/interface": "1.
|
|
29
|
+
"@leafer/interface": "1.7.0",
|
|
30
|
+
"@leafer-ui/interface": "1.7.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/UIData.ts
CHANGED
|
@@ -30,12 +30,9 @@ export class UIData extends LeafData implements IUIData {
|
|
|
30
30
|
} else return strokeWidth
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
public get __hasStroke(): boolean { return (this as IUIData).stroke && (this as IUIData).strokeWidth as unknown as boolean }
|
|
34
|
-
public get __hasHalf(): number { const t = this as IUIData; return (t.stroke && t.strokeAlign === 'center' && t.strokeWidth % 2) || undefined }
|
|
35
33
|
public get __hasMultiPaint(): boolean { // fix: opacity
|
|
36
34
|
const t = this as IUIData
|
|
37
|
-
|
|
38
|
-
return t.fill && this.__hasStroke
|
|
35
|
+
return (t.fill && this.__useStroke) || (t.__isFills && t.fill.length > 1) || (t.__isStrokes && t.stroke.length > 1) || t.__useEffect
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
public __isAlphaPixelFill?: boolean // png / svg / webp
|
package/types/index.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ declare class UIData extends LeafData implements IUIData {
|
|
|
9
9
|
__isFills?: boolean;
|
|
10
10
|
__isStrokes?: boolean;
|
|
11
11
|
get __strokeWidth(): number;
|
|
12
|
-
get __hasStroke(): boolean;
|
|
13
|
-
get __hasHalf(): number;
|
|
14
12
|
get __hasMultiPaint(): boolean;
|
|
15
13
|
__isAlphaPixelFill?: boolean;
|
|
16
14
|
__isAlphaPixelStroke?: boolean;
|