I've tried everything and I can't for the life of me figure out how to determine if a node on the grid is moved. Specifically I'd like to know the node's position when the movement completes so I can persist that information in my app.
Thanks in advance.
Hello @Grandclosing , there's 3 props of diagram widget - actionStartedFiring, actionStillFiring, and actionStoppedFiring which are callbacks and provide you with current action happening. Action you're looking for is MoveItemsAction
@JokerNN
Thank you!
As a follow-up, is there any place that documents this kind of stuff and is up to date?
I looked at the advertised docs here: https://projectstorm.gitbooks.io/react-diagrams/
But those docs seem to be incomplete, offering only really simple 'quick-start' information.
The demos here: http://projectstorm.cloud/react-diagrams/
Also offer only simple examples...
Hey @Grandclosing , I read the code. I understand your frustration, but this project has no commercial support, so some parts are not perfect. But everyone are more than welcome to contribute, so if you succeed in listening to moving event, you can share your demo, that would be just great.
Also you can let me know if you need any help
Thanks @JokerNN ! I will definitely contribute whatever knowledge/code I can. :)
The Build interactive diagrams with storm-react-diagrams blog post has some good notes on the API for events
Events for the diagram model
linksUpdated offsetUpdated zoomUpdated gridUpdated selectionChanged entityRemovedEvents for Link models
targetPortChanged selectionChanged entityRemovedEvents for Node models and Point models
entityRemoved
The 'events and listeners' example has the basics if you haven't already seen that.
Also see #287
@ianchanning The referenced example no longer exists, has it moved?
Most helpful comment
Hello @Grandclosing , there's 3 props of diagram widget -
actionStartedFiring,actionStillFiring, andactionStoppedFiringwhich are callbacks and provide you with current action happening. Action you're looking for isMoveItemsAction