@leafer-ui/display 2.0.0 → 2.0.2
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 +8 -8
- package/src/Group.ts +4 -1
- package/src/Leafer.ts +4 -4
- package/src/UI.ts +5 -0
- package/types/index.d.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "@leafer-ui/display",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "2.0.
|
|
26
|
-
"@leafer-ui/data": "2.0.
|
|
27
|
-
"@leafer-ui/display-module": "2.0.
|
|
28
|
-
"@leafer-ui/decorator": "2.0.
|
|
29
|
-
"@leafer-ui/external": "2.0.
|
|
25
|
+
"@leafer/core": "2.0.2",
|
|
26
|
+
"@leafer-ui/data": "2.0.2",
|
|
27
|
+
"@leafer-ui/display-module": "2.0.2",
|
|
28
|
+
"@leafer-ui/decorator": "2.0.2",
|
|
29
|
+
"@leafer-ui/external": "2.0.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "2.0.
|
|
33
|
-
"@leafer-ui/interface": "2.0.
|
|
32
|
+
"@leafer/interface": "2.0.2",
|
|
33
|
+
"@leafer-ui/interface": "2.0.2"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/Group.ts
CHANGED
|
@@ -63,7 +63,10 @@ export class Group<TInputData = IGroupInputData> extends UI<TInputData> implemen
|
|
|
63
63
|
|
|
64
64
|
override toJSON(options?: IJSONOptions): IUIJSONData {
|
|
65
65
|
const data = super.toJSON(options)
|
|
66
|
-
if (!this.childlessJSON)
|
|
66
|
+
if (!this.childlessJSON) {
|
|
67
|
+
const children: IUIJSONData[] = data.children = []
|
|
68
|
+
this.children.forEach(child => child.skipJSON || children.push(child.toJSON(options)))
|
|
69
|
+
}
|
|
67
70
|
return data
|
|
68
71
|
}
|
|
69
72
|
|
package/src/Leafer.ts
CHANGED
|
@@ -184,13 +184,13 @@ export class Leafer extends Group implements ILeafer {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
public unlockLayout(): void {
|
|
187
|
+
public unlockLayout(updateLayout: boolean = true): void {
|
|
188
188
|
this.layouter.start()
|
|
189
|
-
this.updateLayout()
|
|
189
|
+
if (updateLayout) this.updateLayout()
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
public lockLayout(): void {
|
|
193
|
-
this.updateLayout()
|
|
192
|
+
public lockLayout(updateLayout: boolean = true): void {
|
|
193
|
+
if (updateLayout) this.updateLayout()
|
|
194
194
|
this.layouter.stop()
|
|
195
195
|
}
|
|
196
196
|
|
package/src/UI.ts
CHANGED
|
@@ -312,6 +312,11 @@ export class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements I
|
|
|
312
312
|
public filter?: IFilter | IFilter[]
|
|
313
313
|
|
|
314
314
|
|
|
315
|
+
// need rewrite
|
|
316
|
+
|
|
317
|
+
public complex?: boolean
|
|
318
|
+
|
|
319
|
+
|
|
315
320
|
// @leafer-in/animate rewrite
|
|
316
321
|
|
|
317
322
|
public animation?: IAnimation | IAnimation[]
|
package/types/index.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ declare class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements
|
|
|
92
92
|
backgroundBlur?: INumber | IBlurEffect;
|
|
93
93
|
grayscale?: INumber | IGrayscaleEffect;
|
|
94
94
|
filter?: IFilter | IFilter[];
|
|
95
|
+
complex?: boolean;
|
|
95
96
|
animation?: IAnimation | IAnimation[];
|
|
96
97
|
animationOut?: IAnimation | IAnimation[];
|
|
97
98
|
transition?: ITransition;
|
|
@@ -234,8 +235,8 @@ declare class Leafer extends Group implements ILeafer {
|
|
|
234
235
|
set(data: IUIInputData, transition?: ITransition | 'temp'): void;
|
|
235
236
|
start(): void;
|
|
236
237
|
stop(): void;
|
|
237
|
-
unlockLayout(): void;
|
|
238
|
-
lockLayout(): void;
|
|
238
|
+
unlockLayout(updateLayout?: boolean): void;
|
|
239
|
+
lockLayout(updateLayout?: boolean): void;
|
|
239
240
|
resize(size: IScreenSizeData): void;
|
|
240
241
|
forceRender(bounds?: IBoundsData, sync?: boolean): void;
|
|
241
242
|
requestRender(change?: boolean): void;
|