mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-10-31 23:20:18 +08:00
refactor: rename append to appendTo
This commit is contained in:
1 parent
771e61e6aa
commit
5cd00534c0
11 files changed
+35
-36
No files matched your search
@@ -58,7 +58,7 @@ export class Container<E extends EContainerEvent = EContainerEvent>
|
||||
*/
|
||||
appendChild(...children: RenderItem<any>[]) {
|
||||
children.forEach(v => {
|
||||
v.append(this);
|
||||
v.appendTo(this);
|
||||
});
|
||||
this.requestSort();
|
||||
this.update(this);
|
||||
@@ -77,8 +77,8 @@ export class Container<E extends EContainerEvent = EContainerEvent>
|
||||
this.update(this);
|
||||
}
|
||||
|
||||
append(parent: RenderItem): void {
|
||||
super.append(parent);
|
||||
appendTo(parent: RenderItem): void {
|
||||
super.appendTo(parent);
|
||||
if (this.root) {
|
||||
const root = this.root;
|
||||
this.forEachChild(ele => {
|
||||
|
||||
@@ -728,7 +728,7 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
|
||||
* 将这个渲染元素添加到其他父元素上
|
||||
* @param parent 父元素
|
||||
*/
|
||||
append(parent: RenderItem) {
|
||||
appendTo(parent: RenderItem) {
|
||||
this.remove();
|
||||
parent.children.add(this);
|
||||
this._parent = parent;
|
||||
|
||||
Reference in new issue
Block a user