Skip to content

centering not happening when using .map to create multiple nodes and links #60

@etwerk

Description

@etwerk

When using .map to create a list of and from data, the nodes are all being created and rendered into the upper left corner of the svg.

It looks like the centering logic and is not being calculated correctly when the .map creates an array of objects for each element, so while the elements are being created, the objects aren't being centered. Has anyone been able to use state data to .map through and create multiple within a and still center the graphic within the svg?

It seems to work when each element is hard coded, the issue is in mapping that data to create elements

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions