@leafer/decorator 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/data.ts +5 -2
- package/types/index.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/decorator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "@leafer/decorator",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/platform": "1.
|
|
26
|
-
"@leafer/data": "1.
|
|
27
|
-
"@leafer/debug": "1.
|
|
25
|
+
"@leafer/platform": "1.7.0",
|
|
26
|
+
"@leafer/data": "1.7.0",
|
|
27
|
+
"@leafer/debug": "1.7.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@leafer/interface": "1.
|
|
30
|
+
"@leafer/interface": "1.7.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/data.ts
CHANGED
|
@@ -104,10 +104,13 @@ export function pathInputType(defaultValue?: IValue) {
|
|
|
104
104
|
export const pathType = boundsType
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
export function affectStrokeBoundsType(defaultValue?: IValue) {
|
|
107
|
+
export function affectStrokeBoundsType(defaultValue?: IValue, useStroke?: boolean) {
|
|
108
108
|
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
109
109
|
set(value: IValue) {
|
|
110
|
-
this.__setAttr(key, value)
|
|
110
|
+
if (this.__setAttr(key, value)) {
|
|
111
|
+
doStrokeType(this)
|
|
112
|
+
if (useStroke) this.__.__useStroke = true
|
|
113
|
+
}
|
|
111
114
|
}
|
|
112
115
|
}))
|
|
113
116
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare function naturalBoundsType(defaultValue?: IValue): (target: ILeaf, key:
|
|
|
13
13
|
declare function doBoundsType(leaf: ILeaf): void;
|
|
14
14
|
declare function pathInputType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
15
15
|
declare const pathType: typeof boundsType;
|
|
16
|
-
declare function affectStrokeBoundsType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|
|
16
|
+
declare function affectStrokeBoundsType(defaultValue?: IValue, useStroke?: boolean): (target: ILeaf, key: string) => void;
|
|
17
17
|
declare function doStrokeType(leaf: ILeaf): void;
|
|
18
18
|
declare const strokeType: typeof affectStrokeBoundsType;
|
|
19
19
|
declare function affectRenderBoundsType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
|