Delete nodes cascade to descendants - #806
Merged
Merged
Conversation
lukasz-jazwa
approved these changes
Sep 14, 2026
Jacek-Synergy
added a commit
that referenced
this pull request
Sep 16, 2026
Conflict resolution: - deleteNodes keeps main's descendant cascade (#806) and feeds the cascaded set into partitionIncidentEdges for detach-on-delete. - copy-paste takes main's structure (#807: resolvePastedEnd, collectFreeEdgeEndpointPositions, calculateCenter, empty-paste early exit) and re-applies from the branch: manual-routing points shifted with a free pasted end, and the dangling-aware isInsideCopiedSet copy rule gated on danglingEdges.enabled. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
NgDiagramModelService.deleteNodesnow cascades to all descendants of the deleted nodes (children, grandchildren, ...). Edges connected to any deleted node are removed, as before. This matchesdeleteSelection.Why
Deleting a group with
deleteNodes([groupId])left its children in the model with agroupIdthat pointed at a node that no longer existed. A missing parent counts as visible, so children of a hidden group popped back into view as orphans.The task allowed two fixes: clear the children's
groupId, or cascade likedeleteSelection. Cascade was chosen because both delete paths now behave the same and the docs need no special case.Backward compatibility
deleteNodeson a node with descendants now removes the descendants and their edges too. Code that deleted a group and then re-parented the surviving children itself will now find those children gone. To keep the children, callNgDiagramGroupsService.removeFromGroupfirst, thendeleteNodes.