@leafer/decorator 1.0.0-beta.4 → 1.0.0-beta.6
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 +4 -4
- package/src/data.ts +12 -11
- package/src/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/decorator",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"description": "@leafer/decorator",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@leafer/platform": "1.0.0-beta.
|
|
23
|
-
"@leafer/debug": "1.0.0-beta.
|
|
22
|
+
"@leafer/platform": "1.0.0-beta.6",
|
|
23
|
+
"@leafer/debug": "1.0.0-beta.6"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@leafer/interface": "1.0.0-beta.
|
|
26
|
+
"@leafer/interface": "1.0.0-beta.6"
|
|
27
27
|
}
|
|
28
28
|
}
|
package/src/data.ts
CHANGED
|
@@ -134,12 +134,7 @@ export function sortType(defaultValue?: __Value) {
|
|
|
134
134
|
set(value: __Value) {
|
|
135
135
|
this.__setAttr(key, value)
|
|
136
136
|
this.__layout.surfaceChanged || this.__layout.surfaceChange()
|
|
137
|
-
|
|
138
|
-
if (this.parent) {
|
|
139
|
-
this.parent.__layout.childrenSortChanged = true
|
|
140
|
-
} else {
|
|
141
|
-
this.waitParent(() => { this.parent.__layout.childrenSortChanged = true })
|
|
142
|
-
}
|
|
137
|
+
this.waitParent(() => { this.parent.__layout.childrenSortChanged = true })
|
|
143
138
|
}
|
|
144
139
|
})
|
|
145
140
|
}
|
|
@@ -151,12 +146,18 @@ export function maskType(defaultValue?: __Value) {
|
|
|
151
146
|
set(value: boolean) {
|
|
152
147
|
this.__setAttr(key, value)
|
|
153
148
|
this.__layout.boxChanged || this.__layout.boxChange()
|
|
149
|
+
this.waitParent(() => { this.parent.__updateMask(value) })
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
export function eraserType(defaultValue?: __Value) {
|
|
156
|
+
return (target: ILeaf, key: string) => {
|
|
157
|
+
defineLeafAttr(target, key, defaultValue, {
|
|
158
|
+
set(value: boolean) {
|
|
159
|
+
this.__setAttr(key, value)
|
|
160
|
+
this.waitParent(() => { this.parent.__updateEraser(value) })
|
|
160
161
|
}
|
|
161
162
|
})
|
|
162
163
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aliasType, defineLeafAttr, dataType, positionType, boundsType, affectStrokeBoundsType, strokeType, affectRenderBoundsType, scaleType, rotationType, surfaceType, opacityType, sortType, maskType, hitType, pathType, dataProcessor, layoutProcessor, setDefaultValue, defineDataProcessor } from './data'
|
|
1
|
+
export { aliasType, defineLeafAttr, dataType, positionType, boundsType, affectStrokeBoundsType, strokeType, affectRenderBoundsType, scaleType, rotationType, surfaceType, opacityType, sortType, maskType, eraserType, hitType, pathType, dataProcessor, layoutProcessor, setDefaultValue, defineDataProcessor } from './data'
|
|
2
2
|
export { useModule, rewrite, rewriteAble } from './rewrite'
|
|
3
3
|
export { defineKey, getDescriptor } from './object'
|
|
4
4
|
export { registerUI, registerUIEvent } from './class'
|