Closed elVengador closed 2 years ago
I want to pass extra data like nodeId to use later For example find a node under mouse cursor, then get nodeId and make some operations
Im building nodes inthis way:
const nodes: (SimulationNodeDatum)[] = notes.map(c => Object.create(c))
all extra data from notes is removed if I force like this:
notes
const nodes: (SimulationNodeDatum)[] = notes.map(c => Object.create({ ...c, tmp: true }))
I have an error:
It seems to be working here https://observablehq.com/@recifs/simulation-nodes-with-added-data--support
I want to pass extra data like nodeId to use later For example find a node under mouse cursor, then get nodeId and make some operations
Im building nodes inthis way:
all extra data from
notes
is removed if I force like this:I have an error: