react-sigma icon indicating copy to clipboard operation
react-sigma copied to clipboard

Help needed: Add nodes via click

Open loopmode opened this issue 6 years ago • 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?

loopmode avatar Mar 09 '18 12:03 loopmode

+1

dgoldstein1 avatar Sep 24 '19 01:09 dgoldstein1

fyi ^^ https://github.com/dunnock/react-sigma/issues/16

dgoldstein1 avatar Sep 24 '19 02:09 dgoldstein1

Were you able to ever find a fix to this?

bryandandan avatar Oct 20 '20 15:10 bryandandan