Skip to content

Conversation

GoodBoyDigital
Copy link
Member

Description of change

Fix issue where when destroying a container - the children were not being removed from the render layers.
Added test too.

fixes #11373

Pre-Merge Checklist
  • Tests and/or benchmarks are included
  • Documentation is changed or added
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR title doesn't match the required format. The title should be in this format:

chore: update Text docs
fix: text not rendering
feat: add new feature to Text
breaking: remove Text#resolution 

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes an issue where destroying a container did not remove its children from their render layers. The changes include detaching a child from its render layer in the helper mixin before emitting the removal event and adding tests for verifying both the container and render layer behavior upon destruction.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/scene/container/container-mixins/childrenHelperMixin.ts Added a conditional render layer detachment call before re-emitting the 'childRemoved' event.
src/scene/container/tests/Container.test.ts Added tests to confirm that children are detached from their render layers and destroyed appropriately.

Copy link

codesandbox-ci bot commented Apr 22, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5a1951b:

Sandbox Source
pixi.js-sandbox Configuration

Co-authored-by: Matt Karl <matt@mattkarl.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR title doesn't match the required format. The title should be in this format:

chore: update Text docs
fix: text not rendering
feat: add new feature to Text
breaking: remove Text#resolution 

@GoodBoyDigital GoodBoyDigital changed the title Fix: render layer detachment when destroying. fix: render layer detachment when destroying. Apr 22, 2025
@Zyie Zyie added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Apr 23, 2025
@Zyie Zyie added this pull request to the merge queue Apr 29, 2025
Merged via the queue into dev with commit 9e81903 Apr 29, 2025
5 of 6 checks passed
@Zyie Zyie deleted the fix/renderlayer-removal branch April 29, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Destroying parent which destroys children should also remove children from any render layers
3 participants