@leafer/display 1.0.0-rc.27 → 1.0.0-rc.28
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 +10 -10
- package/src/Leaf.ts +6 -3
- package/types/index.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.28",
|
|
4
4
|
"description": "@leafer/display",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/math": "1.0.0-rc.
|
|
26
|
-
"@leafer/data": "1.0.0-rc.
|
|
27
|
-
"@leafer/layout": "1.0.0-rc.
|
|
28
|
-
"@leafer/display-module": "1.0.0-rc.
|
|
29
|
-
"@leafer/event": "1.0.0-rc.
|
|
30
|
-
"@leafer/decorator": "1.0.0-rc.
|
|
31
|
-
"@leafer/helper": "1.0.0-rc.
|
|
32
|
-
"@leafer/platform": "1.0.0-rc.
|
|
25
|
+
"@leafer/math": "1.0.0-rc.28",
|
|
26
|
+
"@leafer/data": "1.0.0-rc.28",
|
|
27
|
+
"@leafer/layout": "1.0.0-rc.28",
|
|
28
|
+
"@leafer/display-module": "1.0.0-rc.28",
|
|
29
|
+
"@leafer/event": "1.0.0-rc.28",
|
|
30
|
+
"@leafer/decorator": "1.0.0-rc.28",
|
|
31
|
+
"@leafer/helper": "1.0.0-rc.28",
|
|
32
|
+
"@leafer/platform": "1.0.0-rc.28"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@leafer/interface": "1.0.0-rc.
|
|
35
|
+
"@leafer/interface": "1.0.0-rc.28"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/src/Leaf.ts
CHANGED
|
@@ -79,6 +79,7 @@ export class Leaf implements ILeaf {
|
|
|
79
79
|
|
|
80
80
|
public get __onlyHitMask(): boolean { return this.__hasMask && !this.__.hitChildren }
|
|
81
81
|
public get __ignoreHitWorld(): boolean { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren }
|
|
82
|
+
public get __inLazyBounds(): boolean { const { leafer } = this; return leafer && leafer.created && leafer.lazyBounds.hit(this.__world) }
|
|
82
83
|
|
|
83
84
|
public get pathInputed(): boolean { return this.__.__pathInputed as unknown as boolean }
|
|
84
85
|
|
|
@@ -224,6 +225,9 @@ export class Leaf implements ILeaf {
|
|
|
224
225
|
|
|
225
226
|
// ---
|
|
226
227
|
|
|
228
|
+
public updateLayout(): void {
|
|
229
|
+
this.__layout.update()
|
|
230
|
+
}
|
|
227
231
|
|
|
228
232
|
public forceUpdate(attrName?: string): void {
|
|
229
233
|
if (attrName === undefined) attrName = 'width'
|
|
@@ -233,11 +237,10 @@ export class Leaf implements ILeaf {
|
|
|
233
237
|
(this as any)[attrName] = value
|
|
234
238
|
}
|
|
235
239
|
|
|
236
|
-
public
|
|
237
|
-
this.
|
|
240
|
+
public forceRender(_bounds?: IBoundsData): void {
|
|
241
|
+
this.forceUpdate('surface')
|
|
238
242
|
}
|
|
239
243
|
|
|
240
|
-
|
|
241
244
|
// LeafMatrix rewrite
|
|
242
245
|
|
|
243
246
|
public __updateWorldMatrix(): void { }
|
package/types/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ declare class Leaf implements ILeaf {
|
|
|
41
41
|
__hitCanvas?: IHitCanvas;
|
|
42
42
|
get __onlyHitMask(): boolean;
|
|
43
43
|
get __ignoreHitWorld(): boolean;
|
|
44
|
+
get __inLazyBounds(): boolean;
|
|
44
45
|
get pathInputed(): boolean;
|
|
45
46
|
__captureMap?: IEventListenerMap;
|
|
46
47
|
__bubbleMap?: IEventListenerMap;
|
|
@@ -76,8 +77,9 @@ declare class Leaf implements ILeaf {
|
|
|
76
77
|
findOne(_condition: number | string | IFindMethod, _options?: any): ILeaf | undefined;
|
|
77
78
|
findId(_id: number | string): ILeaf | undefined;
|
|
78
79
|
focus(_value?: boolean): void;
|
|
79
|
-
forceUpdate(attrName?: string): void;
|
|
80
80
|
updateLayout(): void;
|
|
81
|
+
forceUpdate(attrName?: string): void;
|
|
82
|
+
forceRender(_bounds?: IBoundsData): void;
|
|
81
83
|
__updateWorldMatrix(): void;
|
|
82
84
|
__updateLocalMatrix(): void;
|
|
83
85
|
__updateWorldBounds(): void;
|