Skip to content

Commit

Permalink
fixed: object tree nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-swf committed Dec 10, 2021
1 parent 149e633 commit 6dd4d04
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ export class ObjectTreeInspector extends Inspector {
}

public enable(config: PluginConfig) { this.setRoot(config.root); }
public disable() { this.model.empty(); }

public disable() {
this.model.empty();

const emptyContent = this.contentElement.cloneNode(false);
this.replaceChild(emptyContent, this.contentElement);
this.contentElement = emptyContent as HTMLElement;
}

private setRoot(root: PIXI.DisplayObjectContainer | Phaser.Stage) {
this.model.create(root);
Expand Down

0 comments on commit 6dd4d04

Please sign in to comment.