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

Method swapChildrenAt

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

* Swap children at positions * 交换指定位置的子对象

(index1: number, index2: number)

Source from the content-addressed store, hash-verified

325 * 交换指定位置的子对象
326 */
327 public swapChildrenAt(index1: number, index2: number): void {
328 const child1 = this._children[index1];
329 const child2 = this._children[index2];
330
331 this.setChildIndex(child1, index2);
332 this.setChildIndex(child2, index1);
333 }
334
335 /**
336 * Check if contains a child

Callers 1

swapChildrenMethod · 0.95

Calls 1

setChildIndexMethod · 0.95

Tested by

no test coverage detected