MCPcopy Create free account
hub / github.com/esengine/esengine / removeChildren

Method removeChildren

packages/fairygui/src/core/GComponent.ts:159–167  ·  view source on GitHub ↗

* Remove children in range * 移除指定范围的子对象

(beginIndex: number = 0, endIndex: number = -1, bDispose: boolean = false)

Source from the content-addressed store, hash-verified

157 * 移除指定范围的子对象
158 */
159 public removeChildren(beginIndex: number = 0, endIndex: number = -1, bDispose: boolean = false): void {
160 if (endIndex < 0 || endIndex >= this._children.length) {
161 endIndex = this._children.length - 1;
162 }
163
164 for (let i = endIndex; i >= beginIndex; i--) {
165 this.removeChildAt(i, bDispose);
166 }
167 }
168
169 /**
170 * Get child at index

Callers 1

disposeMethod · 0.95

Calls 1

removeChildAtMethod · 0.95

Tested by

no test coverage detected