@leafer/decorator 2.0.2 → 2.0.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 +5 -5
- package/src/data.ts +5 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/decorator",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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": "2.0.
|
|
26
|
-
"@leafer/data": "2.0.
|
|
27
|
-
"@leafer/debug": "2.0.
|
|
25
|
+
"@leafer/platform": "2.0.3",
|
|
26
|
+
"@leafer/data": "2.0.3",
|
|
27
|
+
"@leafer/debug": "2.0.3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@leafer/interface": "2.0.
|
|
30
|
+
"@leafer/interface": "2.0.3"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/data.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ILeafData, ILeaf, IObject, IValue, ILeafAttrDescriptor, ILeafAttrDescriptorFn, IValueFunction, IMatrixWithBoundsScaleData } from '@leafer/interface'
|
|
2
2
|
import { DataHelper, isEmptyData, isObject, isUndefined } from '@leafer/data'
|
|
3
|
-
import { Debug } from '@leafer/debug'
|
|
4
3
|
|
|
5
4
|
import { defineKey, getDescriptor, createDescriptor } from './object'
|
|
6
5
|
|
|
@@ -156,7 +155,7 @@ export function dimType(defaultValue?: IValue) {
|
|
|
156
155
|
if (this.__setAttr(key, value)) {
|
|
157
156
|
const data = this.__
|
|
158
157
|
DataHelper.stintSet(data, '__useDim', (data.dim || data.bright || data.dimskip) as boolean)
|
|
159
|
-
this.__layout.surfaceChange()
|
|
158
|
+
//this.__layout.surfaceChange()
|
|
160
159
|
}
|
|
161
160
|
}
|
|
162
161
|
}))
|
|
@@ -198,6 +197,7 @@ function checkMask(leaf: ILeaf): void { // mask 的透明度和可见性变更
|
|
|
198
197
|
function doVisible(leaf: ILeaf, key: string, value: IValue, oldValue: IValue): void {
|
|
199
198
|
if (leaf.__setAttr(key, value)) {
|
|
200
199
|
leaf.__layout.opacityChanged || leaf.__layout.opacityChange()
|
|
200
|
+
// this.__layout.surfaceChange()
|
|
201
201
|
if (oldValue === 0 || value === 0) doBoundsType(leaf) // 0 = display: none
|
|
202
202
|
}
|
|
203
203
|
}
|
|
@@ -206,7 +206,7 @@ export function sortType(defaultValue?: IValue) {
|
|
|
206
206
|
return decorateLeafAttr(defaultValue, (key: string) => attr({
|
|
207
207
|
set(value: IValue) {
|
|
208
208
|
if (this.__setAttr(key, value)) {
|
|
209
|
-
this.__layout.surfaceChange()
|
|
209
|
+
// this.__layout.surfaceChange()
|
|
210
210
|
this.waitParent(() => { this.parent.__layout.childrenSortChange() })
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -237,7 +237,7 @@ export function hitType(defaultValue?: IValue) {
|
|
|
237
237
|
set(value: IValue) {
|
|
238
238
|
if (this.__setAttr(key, value)) {
|
|
239
239
|
this.__layout.hitCanvasChanged = true
|
|
240
|
-
if (Debug.showBounds === 'hit') this.__layout.surfaceChange()
|
|
240
|
+
//if (Debug.showBounds === 'hit') this.__layout.surfaceChange()
|
|
241
241
|
if (this.leafer) this.leafer.updateCursor()
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -343,5 +343,4 @@ export function defineDataProcessor(target: ILeaf, key: string, defaultValue?: I
|
|
|
343
343
|
|
|
344
344
|
defineKey(data, key, property)
|
|
345
345
|
|
|
346
|
-
}
|
|
347
|
-
|
|
346
|
+
}
|