Skip to content

Commit

Permalink
skipping objects with __skip property set
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-jg committed Sep 1, 2021
1 parent 8b8ccc2 commit 77da00d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/object-tree/inspector/object-tree-inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export class ObjectTreeInspector extends Inspector {
}

private createNode(obj: PIXI.DisplayObject, parent: HTMLElement, model: ObjectTreeModel) {
if (obj.__skip) return;
const m = model.getById(obj.__instanceId);
if (!m) throw new Error(`Model not found for ${obj.__instanceId}`);

const node = document.createElement(TreeNode.tagName) as TreeNode;
const node = parent.appendChild(document.createElement(TreeNode.tagName)) as TreeNode;
node.classList.add(`level-${m.level}`);
node.onNodeSelect = this.onNodeSelected.bind(this);
node.setContent(obj, m.type);
parent.appendChild(node);

m.node = node;

Expand Down

0 comments on commit 77da00d

Please sign in to comment.