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.