@leafer/helper 1.0.0-rc.3 → 1.0.0-rc.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/helper",
3
- "version": "1.0.0-rc.3",
3
+ "version": "1.0.0-rc.30",
4
4
  "description": "@leafer/helper",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -15,16 +15,16 @@
15
15
  "type": "git",
16
16
  "url": "https://github.com/leaferjs/leafer.git"
17
17
  },
18
- "homepage": "https://github.com/leaferjs/leafer/tree/main/packages/helper",
18
+ "homepage": "https://github.com/leaferjs/leafer/tree/main/packages/display-module/helper",
19
19
  "bugs": "https://github.com/leaferjs/leafer/issues",
20
20
  "keywords": [
21
21
  "leafer",
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.0.0-rc.3"
25
+ "@leafer/math": "1.0.0-rc.30"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.0.0-rc.3"
28
+ "@leafer/interface": "1.0.0-rc.30"
29
29
  }
30
30
  }
@@ -1,10 +1,8 @@
1
- import { ILeaf, ILeafList } from '@leafer/interface'
1
+ import { ILeaf, ILeafLevelList, ILeafList } from '@leafer/interface'
2
2
 
3
+ import { LeafHelper } from './LeafHelper'
3
4
 
4
- interface ILeafPushList {
5
- push(item: ILeaf): void
6
- }
7
-
5
+ const { updateBounds } = LeafHelper
8
6
 
9
7
  export const BranchHelper = {
10
8
 
@@ -14,7 +12,7 @@ export const BranchHelper = {
14
12
 
15
13
  // push
16
14
 
17
- pushAllChildBranch(branch: ILeaf, pushList: ILeafPushList): void {
15
+ pushAllChildBranch(branch: ILeaf, leafList: ILeafList | ILeafLevelList): void {
18
16
  branch.__tempNumber = 1 // 标识需要更新子Leaf元素的WorldBounds分支 Layouter需使用
19
17
 
20
18
  if (branch.__.__childBranchNumber) {
@@ -23,19 +21,19 @@ export const BranchHelper = {
23
21
  branch = children[i]
24
22
  if (branch.isBranch) {
25
23
  branch.__tempNumber = 1
26
- pushList.push(branch)
27
- pushAllChildBranch(branch, pushList)
24
+ leafList.add(branch)
25
+ pushAllChildBranch(branch, leafList)
28
26
  }
29
27
  }
30
28
  }
31
29
  },
32
30
 
33
- pushAllParent(leaf: ILeaf, pushList: ILeafPushList): void {
34
- const { keys } = (pushList as ILeafList)
31
+ pushAllParent(leaf: ILeaf, leafList: ILeafList | ILeafLevelList): void {
32
+ const { keys } = (leafList as ILeafList)
35
33
  if (keys) {
36
34
  while (leaf.parent) {
37
35
  if (keys[leaf.parent.innerId] === undefined) {
38
- pushList.push(leaf.parent)
36
+ leafList.add(leaf.parent)
39
37
  leaf = leaf.parent
40
38
  } else {
41
39
  break
@@ -43,7 +41,7 @@ export const BranchHelper = {
43
41
  }
44
42
  } else {
45
43
  while (leaf.parent) {
46
- pushList.push(leaf.parent)
44
+ leafList.add(leaf.parent)
47
45
  leaf = leaf.parent
48
46
  }
49
47
  }
@@ -64,16 +62,24 @@ export const BranchHelper = {
64
62
  }
65
63
  },
66
64
 
67
- updateWorldBoundsByBranchStack(branchStack: ILeaf[]): void {
68
- let branch: ILeaf
65
+ updateBounds(branch: ILeaf, exclude?: ILeaf): void {
66
+ const branchStack: ILeaf[] = [branch]
67
+ pushAllBranchStack(branch, branchStack)
68
+ updateBoundsByBranchStack(branchStack, exclude)
69
+ },
70
+
71
+ updateBoundsByBranchStack(branchStack: ILeaf[], exclude?: ILeaf): void {
72
+ let branch: ILeaf, children: ILeaf[]
69
73
  for (let i = branchStack.length - 1; i > -1; i--) {
70
74
  branch = branchStack[i]
71
- for (let j = 0, len = branch.children.length; j < len; j++) {
72
- branch.children[j].__updateWorldBounds()
75
+ children = branch.children
76
+ for (let j = 0, len = children.length; j < len; j++) {
77
+ updateBounds(children[j])
73
78
  }
79
+ if (exclude && exclude === branch) continue
80
+ updateBounds(branch)
74
81
  }
75
- branch.__updateWorldBounds()
76
82
  }
77
83
  }
78
84
 
79
- const { pushAllChildBranch, pushAllBranchStack } = BranchHelper
85
+ const { pushAllChildBranch, pushAllBranchStack, updateBoundsByBranchStack } = BranchHelper
@@ -1,4 +1,4 @@
1
- import { ILeaf, IBoundsData } from '@leafer/interface'
1
+ import { ILeaf, IBoundsData, IRenderOptions } from '@leafer/interface'
2
2
 
3
3
 
4
4
  export const LeafBoundsHelper = {
@@ -8,27 +8,33 @@ export const LeafBoundsHelper = {
8
8
  },
9
9
 
10
10
  localBoxBounds(target: ILeaf): IBoundsData {
11
- return target.__.isEraser ? null : target.__local
11
+ return target.__.eraser || target.__.visible === 0 ? null : (target.__local || target.__layout)
12
12
  },
13
13
 
14
- localEventBounds(target: ILeaf): IBoundsData {
15
- return target.__.isEraser ? null : target.__layout.localStrokeBounds
14
+ localStrokeBounds(target: ILeaf): IBoundsData {
15
+ return target.__.eraser || target.__.visible === 0 ? null : target.__layout.localStrokeBounds
16
16
  },
17
17
 
18
18
  localRenderBounds(target: ILeaf): IBoundsData {
19
- return target.__.isEraser ? null : target.__layout.localRenderBounds
19
+ return target.__.eraser || target.__.visible === 0 ? null : target.__layout.localRenderBounds
20
20
  },
21
21
 
22
22
  maskLocalBoxBounds(target: ILeaf): IBoundsData {
23
- return target.__.isMask ? target.__local : null
23
+ return target.__.mask ? target.__localBoxBounds : null
24
24
  },
25
25
 
26
- maskLocalEventBounds(target: ILeaf): IBoundsData {
27
- return target.__.isMask ? target.__layout.localStrokeBounds : null
26
+ maskLocalStrokeBounds(target: ILeaf): IBoundsData {
27
+ return target.__.mask ? target.__layout.localStrokeBounds : null
28
28
  },
29
29
 
30
30
  maskLocalRenderBounds(target: ILeaf): IBoundsData {
31
- return target.__.isMask ? target.__layout.localRenderBounds : null
31
+ return target.__.mask ? target.__layout.localRenderBounds : null
32
+ },
33
+
34
+ excludeRenderBounds(child: ILeaf, options: IRenderOptions): boolean {
35
+ if (options.bounds && !options.bounds.hit(child.__world, options.matrix)) return true
36
+ if (options.hideBounds && options.hideBounds.includes(child.__world, options.matrix)) return true
37
+ return false
32
38
  }
33
39
 
34
40
  }
package/src/LeafHelper.ts CHANGED
@@ -1,23 +1,47 @@
1
- import { IBranch, ILeaf, IMatrixData, IPointData } from '@leafer/interface'
2
- import { MathHelper, MatrixHelper, PointHelper } from '@leafer/math'
1
+ import { IAlign, ILeaf, IMatrixData, IPointData } from '@leafer/interface'
2
+ import { MathHelper, MatrixHelper, PointHelper, AroundHelper } from '@leafer/math'
3
3
 
4
4
 
5
- const { copy, translate, toInnerPoint, scaleOfOuter, rotateOfOuter, skewOfOuter } = MatrixHelper
5
+ const { copy, toInnerPoint, scaleOfOuter, rotateOfOuter, skewOfOuter, multiplyParent, divideParent, getLayout } = MatrixHelper
6
6
  const matrix = {} as IMatrixData
7
7
 
8
8
  export const LeafHelper = {
9
9
 
10
- updateAllWorldMatrix(leaf: ILeaf): void {
11
- leaf.__updateWorldMatrix()
10
+ updateAllMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void {
11
+ if (checkAutoLayout && leaf.__hasAutoLayout && leaf.__layout.matrixChanged) waitAutoLayout = true
12
+
13
+ updateMatrix(leaf, checkAutoLayout, waitAutoLayout)
12
14
 
13
15
  if (leaf.isBranch) {
14
16
  const { children } = leaf
15
17
  for (let i = 0, len = children.length; i < len; i++) {
16
- updateAllWorldMatrix(children[i])
18
+ updateAllMatrix(children[i], checkAutoLayout, waitAutoLayout)
17
19
  }
18
20
  }
19
21
  },
20
22
 
23
+ updateMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void {
24
+ const layout = leaf.__layout
25
+
26
+ if (checkAutoLayout) {
27
+ if (waitAutoLayout) {
28
+ layout.waitAutoLayout = true
29
+ if (leaf.__hasAutoLayout) layout.matrixChanged = false // wait updateAutoLayout
30
+ }
31
+ } else if (layout.waitAutoLayout) {
32
+ layout.waitAutoLayout = false
33
+ }
34
+
35
+ if (layout.matrixChanged) leaf.__updateLocalMatrix()
36
+ if (!layout.waitAutoLayout) leaf.__updateWorldMatrix()
37
+ },
38
+
39
+ updateBounds(leaf: ILeaf): void {
40
+ const layout = leaf.__layout
41
+ if (layout.boundsChanged) leaf.__updateLocalBounds()
42
+ if (!layout.waitAutoLayout) leaf.__updateWorldBounds()
43
+ },
44
+
21
45
  updateAllWorldOpacity(leaf: ILeaf): void {
22
46
  leaf.__updateWorldOpacity()
23
47
 
@@ -30,7 +54,6 @@ export const LeafHelper = {
30
54
  },
31
55
 
32
56
  updateAllChange(leaf: ILeaf): void {
33
-
34
57
  updateAllWorldOpacity(leaf)
35
58
 
36
59
  leaf.__updateChange()
@@ -44,88 +67,130 @@ export const LeafHelper = {
44
67
  },
45
68
 
46
69
  worldHittable(t: ILeaf): boolean {
47
- if (!t.__.hittable) return false
48
- let { parent } = t
49
- while (parent) {
50
- if (!parent.__.hittable || !parent.__.hitChildren) return false
51
- parent = parent.parent
70
+ while (t) {
71
+ if (!t.__.hittable) return false
72
+ t = t.parent
52
73
  }
53
74
  return true
54
75
  },
55
76
 
56
77
  // transform
57
78
 
58
- moveWorld(t: ILeaf, x: number, y: number): void {
59
- t.__layout.checkUpdate()
60
- const local = { x, y }
61
- if (t.parent) toInnerPoint(t.parent.__world, local, local, true)
79
+ moveWorld(t: ILeaf, x: number | IPointData, y = 0): void {
80
+ const local = typeof x === 'object' ? { ...x } : { x, y }
81
+ if (t.parent) toInnerPoint(t.parent.worldTransform, local, local, true)
62
82
  L.moveLocal(t, local.x, local.y)
63
83
  },
64
84
 
65
- moveLocal(t: ILeaf, x: number, y: number = 0): void {
66
- t.x += x
67
- t.y += y
85
+ moveLocal(t: ILeaf, x: number | IPointData, y = 0): void {
86
+ if (typeof x === 'object') {
87
+ t.x += x.x
88
+ t.y += x.y
89
+ } else {
90
+ t.x += x
91
+ t.y += y
92
+ }
68
93
  },
69
94
 
70
- zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, moveLayer?: ILeaf): void {
71
- t.__layout.checkUpdate()
72
- const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin
73
- this.zoomOfLocal(t, local, scaleX, scaleY, moveLayer)
95
+ zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void {
96
+ L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize)
74
97
  },
75
98
 
76
- zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY: number = scaleX, moveLayer?: ILeaf): void {
77
- copy(matrix, t.__local)
78
- if (moveLayer) translate(matrix, moveLayer.x, moveLayer.y)
99
+ zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY: number = scaleX, resize?: boolean): void {
100
+ copy(matrix, t.__localMatrix)
79
101
  scaleOfOuter(matrix, origin, scaleX, scaleY)
80
- if (!moveLayer) moveLayer = t
81
- moveLayer.x += matrix.e - t.__local.e
82
- moveLayer.y += matrix.f - t.__local.f
83
- t.scaleX *= scaleX
84
- t.scaleY *= scaleY
102
+ moveByMatrix(t, matrix)
103
+ t.scaleResize(scaleX, scaleY, resize !== true)
85
104
  },
86
105
 
87
- rotateOfWorld(t: ILeaf, origin: IPointData, angle: number, moveLayer?: ILeaf): void {
88
- t.__layout.checkUpdate()
89
- const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin
90
- this.rotateOfLocal(t, local, angle, moveLayer)
106
+ rotateOfWorld(t: ILeaf, origin: IPointData, angle: number): void {
107
+ L.rotateOfLocal(t, getTempLocal(t, origin), angle)
91
108
  },
92
109
 
93
- rotateOfLocal(t: ILeaf, origin: IPointData, angle: number, moveLayer?: ILeaf): void {
94
- copy(matrix, t.__local)
95
- if (moveLayer) translate(matrix, moveLayer.x, moveLayer.y)
110
+ rotateOfLocal(t: ILeaf, origin: IPointData, angle: number): void {
111
+ copy(matrix, t.__localMatrix)
96
112
  rotateOfOuter(matrix, origin, angle)
97
- if (!moveLayer) moveLayer = t
98
- moveLayer.x += matrix.e - t.__local.e
99
- moveLayer.y += matrix.f - t.__local.f
113
+ moveByMatrix(t, matrix)
100
114
  t.rotation = MathHelper.formatRotation(t.rotation + angle)
101
-
102
115
  },
103
116
 
104
- skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, moveLayer?: ILeaf): void {
105
- t.__layout.checkUpdate()
106
- const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin
107
- this.skewOfLocal(t, local, skewX, skewY, moveLayer)
117
+ skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean): void {
118
+ L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize)
108
119
  },
109
120
 
110
- skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY: number, moveLayer?: ILeaf): void {
111
- copy(matrix, t.__local)
112
- if (moveLayer) translate(matrix, moveLayer.x, moveLayer.y)
121
+ skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY: number = 0, resize?: boolean): void {
122
+ copy(matrix, t.__localMatrix)
113
123
  skewOfOuter(matrix, origin, skewX, skewY)
114
- if (!moveLayer) moveLayer = t
115
- moveLayer.x = matrix.e - t.__local.e
116
- moveLayer.y = matrix.f - t.__local.f
117
- t.skewX = MathHelper.formatSkew(t.skewX + skewX)
118
- t.skewY = MathHelper.formatSkew(t.skewY + skewY)
119
- },
120
-
121
- drop(t: ILeaf, parent: IBranch): void {
122
- const position = { x: t.x, y: t.y }
123
- t.localToWorld(position)
124
- parent.worldToInner(position)
125
- t.set(position)
126
- parent.add(t)
124
+ L.setTransform(t, matrix, resize)
125
+ },
126
+
127
+ transformWorld(t: ILeaf, transform: IMatrixData, resize?: boolean): void {
128
+ copy(matrix, t.worldTransform)
129
+ multiplyParent(matrix, transform)
130
+ if (t.parent) divideParent(matrix, t.parent.worldTransform)
131
+ L.setTransform(t, matrix, resize)
132
+ },
133
+
134
+ transform(t: ILeaf, transform: IMatrixData, resize?: boolean): void {
135
+ copy(matrix, t.localTransform)
136
+ multiplyParent(matrix, transform)
137
+ L.setTransform(t, matrix, resize)
138
+ },
139
+
140
+ setTransform(t: ILeaf, transform: IMatrixData, resize?: boolean): void {
141
+ const layout = getLayout(transform)
142
+ if (resize) {
143
+ const scaleX = layout.scaleX / t.scaleX
144
+ const scaleY = layout.scaleY / t.scaleY
145
+ delete layout.scaleX
146
+ delete layout.scaleY
147
+ t.set(layout)
148
+ t.scaleResize(scaleX, scaleY, resize !== true)
149
+ } else {
150
+ t.set(layout)
151
+ }
152
+ },
153
+
154
+ getLocalOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData {
155
+ return PointHelper.tempToOuterOf(L.getInnerOrigin(t, origin), t.localTransform)
156
+ },
157
+
158
+ getInnerOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData {
159
+ if (typeof origin === 'string') AroundHelper.toPoint(origin, t.boxBounds, origin = {} as IPointData)
160
+ return origin
161
+ },
162
+
163
+ getRelativeWorld(t: ILeaf, relative: ILeaf, temp?: boolean): IMatrixData {
164
+ copy(matrix, t.worldTransform)
165
+ divideParent(matrix, relative.worldTransform)
166
+ return temp ? matrix : { ...matrix }
167
+ },
168
+
169
+ drop(t: ILeaf, parent: ILeaf, index?: number, resize?: boolean): void {
170
+ t.setTransform(L.getRelativeWorld(t, parent, true), resize)
171
+ parent.add(t, index)
172
+ },
173
+
174
+ hasParent(p: ILeaf, parent: ILeaf): boolean | void {
175
+ if (!parent) return false
176
+ while (p) {
177
+ if (parent === p) return true
178
+ p = p.parent
179
+ }
127
180
  }
128
181
 
129
182
  }
183
+
130
184
  const L = LeafHelper
131
- const { updateAllWorldMatrix, updateAllWorldOpacity, updateAllChange } = L
185
+ const { updateAllMatrix, updateMatrix, updateAllWorldOpacity, updateAllChange } = L
186
+
187
+ function moveByMatrix(t: ILeaf, matrix: IMatrixData): void {
188
+ const { e, f } = t.__localMatrix
189
+ t.x += matrix.e - e
190
+ t.y += matrix.f - f
191
+ }
192
+
193
+ function getTempLocal(t: ILeaf, world: IPointData): IPointData {
194
+ t.__layout.update()
195
+ return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world
196
+ }
package/src/WaitHelper.ts CHANGED
@@ -2,7 +2,10 @@ import { IFunction } from '@leafer/interface'
2
2
 
3
3
  export const WaitHelper = {
4
4
  run(wait: IFunction[]): void {
5
- for (let i = 0, len = wait.length; i < len; i++) { wait[i]() }
6
- wait.length = 0
5
+ if (wait && wait.length) {
6
+ const len = wait.length
7
+ for (let i = 0; i < len; i++) { wait[i]() }
8
+ wait.length === len ? wait.length = 0 : wait.splice(0, len)
9
+ }
7
10
  }
8
11
  }
package/types/index.d.ts CHANGED
@@ -1,40 +1,48 @@
1
- import { ILeaf, IPointData, IBranch, IBoundsData, IFunction } from '@leafer/interface';
1
+ import { ILeaf, IPointData, IMatrixData, IAlign, IBoundsData, IRenderOptions, ILeafList, ILeafLevelList, IFunction } from '@leafer/interface';
2
2
 
3
3
  declare const LeafHelper: {
4
- updateAllWorldMatrix(leaf: ILeaf): void;
4
+ updateAllMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void;
5
+ updateMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void;
6
+ updateBounds(leaf: ILeaf): void;
5
7
  updateAllWorldOpacity(leaf: ILeaf): void;
6
8
  updateAllChange(leaf: ILeaf): void;
7
9
  worldHittable(t: ILeaf): boolean;
8
- moveWorld(t: ILeaf, x: number, y: number): void;
9
- moveLocal(t: ILeaf, x: number, y?: number): void;
10
- zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, moveLayer?: ILeaf): void;
11
- zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, moveLayer?: ILeaf): void;
12
- rotateOfWorld(t: ILeaf, origin: IPointData, angle: number, moveLayer?: ILeaf): void;
13
- rotateOfLocal(t: ILeaf, origin: IPointData, angle: number, moveLayer?: ILeaf): void;
14
- skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, moveLayer?: ILeaf): void;
15
- skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY: number, moveLayer?: ILeaf): void;
16
- drop(t: ILeaf, parent: IBranch): void;
10
+ moveWorld(t: ILeaf, x: number | IPointData, y?: number): void;
11
+ moveLocal(t: ILeaf, x: number | IPointData, y?: number): void;
12
+ zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void;
13
+ zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean): void;
14
+ rotateOfWorld(t: ILeaf, origin: IPointData, angle: number): void;
15
+ rotateOfLocal(t: ILeaf, origin: IPointData, angle: number): void;
16
+ skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean): void;
17
+ skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean): void;
18
+ transformWorld(t: ILeaf, transform: IMatrixData, resize?: boolean): void;
19
+ transform(t: ILeaf, transform: IMatrixData, resize?: boolean): void;
20
+ setTransform(t: ILeaf, transform: IMatrixData, resize?: boolean): void;
21
+ getLocalOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData;
22
+ getInnerOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData;
23
+ getRelativeWorld(t: ILeaf, relative: ILeaf, temp?: boolean): IMatrixData;
24
+ drop(t: ILeaf, parent: ILeaf, index?: number, resize?: boolean): void;
25
+ hasParent(p: ILeaf, parent: ILeaf): boolean | void;
17
26
  };
18
27
 
19
28
  declare const LeafBoundsHelper: {
20
29
  worldBounds(target: ILeaf): IBoundsData;
21
30
  localBoxBounds(target: ILeaf): IBoundsData;
22
- localEventBounds(target: ILeaf): IBoundsData;
31
+ localStrokeBounds(target: ILeaf): IBoundsData;
23
32
  localRenderBounds(target: ILeaf): IBoundsData;
24
33
  maskLocalBoxBounds(target: ILeaf): IBoundsData;
25
- maskLocalEventBounds(target: ILeaf): IBoundsData;
34
+ maskLocalStrokeBounds(target: ILeaf): IBoundsData;
26
35
  maskLocalRenderBounds(target: ILeaf): IBoundsData;
36
+ excludeRenderBounds(child: ILeaf, options: IRenderOptions): boolean;
27
37
  };
28
38
 
29
- interface ILeafPushList {
30
- push(item: ILeaf): void;
31
- }
32
39
  declare const BranchHelper: {
33
40
  sort(a: ILeaf, b: ILeaf): number;
34
- pushAllChildBranch(branch: ILeaf, pushList: ILeafPushList): void;
35
- pushAllParent(leaf: ILeaf, pushList: ILeafPushList): void;
41
+ pushAllChildBranch(branch: ILeaf, leafList: ILeafList | ILeafLevelList): void;
42
+ pushAllParent(leaf: ILeaf, leafList: ILeafList | ILeafLevelList): void;
36
43
  pushAllBranchStack(branch: ILeaf, pushList: ILeaf[]): void;
37
- updateWorldBoundsByBranchStack(branchStack: ILeaf[]): void;
44
+ updateBounds(branch: ILeaf, exclude?: ILeaf): void;
45
+ updateBoundsByBranchStack(branchStack: ILeaf[], exclude?: ILeaf): void;
38
46
  };
39
47
 
40
48
  declare const WaitHelper: {