Help needed: Add nodes via click
loopmode opened this issue · 3 comments
Hi.
I am trying to add nodes by click. I just can't figure out how to actually convert the coordinates correctly.
I was trying to follow the sigma example at https://github.com/jacomyal/sigma.js/blob/master/examples/add-node-on-click.html#L410-L415
I created a repo at https://github.com/loopmode/react-sigma-experiments
The relevant lines there are https://github.com/loopmode/react-sigma-experiments/blob/master/src/App.js#L84-L88 but I just can't make it work :/
I appreciate any help. Ideally, someone would actually clone and launch my demo project..
Also: Am I just making things complicated while it's much easier?
Is there an example of how to add nodes via click with react-sigma
somewhere?
+1
fyi ^^ #16
Were you able to ever find a fix to this?