Thank you for your amazing library.
I am implementing a custom tree layout and drag & drop functionality for the graph layout and I would like to get the position of mouse in terms the graph coordinate system for onMouseMove event (so I can determine the closest graph tree branch where the draggable element should potentially belong to)
Because of zoom and translate, event.clientX - ref.current.getBoundingClientRect().x wouldn't really work here.
Could you please advise on what would be the easiest way of retrieving those coordinates?
Thanks,
D.
Thank you for your amazing library.
I am implementing a custom tree layout and drag & drop functionality for the graph layout and I would like to get the position of mouse in terms the graph coordinate system for onMouseMove event (so I can determine the closest graph tree branch where the draggable element should potentially belong to)
Because of zoom and translate,
event.clientX - ref.current.getBoundingClientRect().xwouldn't really work here.Could you please advise on what would be the easiest way of retrieving those coordinates?
Thanks,
D.