How can i find X,Y axis coordinates to connect two elements in react simple maps

Viewed 17

I am using react simple maps module in my project. i want to create a create a function which dynamically gives me the offsetLeft(dx) and offsetTop(dy) value based on the coordinate i get from using getBoundingClientRect() function on my source and target element.

What formula can i use achieve my desired output.

0 Answers
Related