Skip to content

Node animation does not work as expected #12

@akambale

Description

@akambale

Describe the bug
In the collapsible tidy tree diagram that was used as reference code, nodes in the tree fade in and out and the circles shrink and grow. I was unable to copy this functionality in this library.

If any D3 experts are interested in taking a crack at debugging this your help is much appreciated!

To Reproduce
See the live playground. Click on the tree nodes.
See the example from d3noob. This tree animates correctly.

See the update code where this style changing code is supposed to be working.

Additional context
I wonder if part of the issue is that this library passes a graph into d3.hierarchy, which is not the expected input. Because these data objects are referenced and referenced as we set multiple trees, are the D3 coordinate objects persisted in memory? And thus, the previous r and fill-opacity values are preserved. This is only a hunch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions