Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Nodes are not reused properly when adding/removing them #12

Closed
kachkaev opened this issue Dec 8, 2016 · 0 comments · Fixed by #13
Closed

Nodes are not reused properly when adding/removing them #12

kachkaev opened this issue Dec 8, 2016 · 0 comments · Fixed by #13

Comments

@kachkaev
Copy link
Collaborator

kachkaev commented Dec 8, 2016

Hey guys!

Looks like there is an issue with how d3 reuses nodes. Here is what's happening when I add three leafs to a list at the very top one by one and then remove them (also one by one):

anim

The second (the largest) state branch is not affected at all, but there's quite a lot going on visually.

Those strange unexpected horisontal jumps probably happen because of how d3 treats ids of the nodes. If they are represented as an array and id = i, adding or removing an item in the middle of it is likely to bring in this effect.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant