Skip to content

Commit

Permalink
#154 コンテナへの追加・削除時にコンテナのキャッシュを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
ienaga committed Feb 4, 2025
1 parent b2f4209 commit d6b0dc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export const execute = <P extends DisplayObjectContainer, D extends DisplayObjec
children.splice(index, 0, display_object);
}

// cache clear
display_object_container.$container = null;

// Set parent-child relationship
display_object.parent = display_object_container;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export const execute = <P extends DisplayObjectContainer, D extends DisplayObjec
children.splice(depth, 1);
}

// cache clear
display_object_container.$container = null;

// remove all broadcast events
if (display_object.hasEventListener(Event.ENTER_FRAME)) {
display_object.removeAllEventListener(Event.ENTER_FRAME);
Expand Down

0 comments on commit d6b0dc5

Please sign in to comment.