I noticed that the x and y coordinates that React-Draggable gives out is completely different from what getBoundingClientRect gives out. Here's a snippet of my code:
When I print out the values of both ref.getBoundingClientRect() from the component and that of data are completely different. Is there any way to convert these values?
I noticed that the x and y coordinates that React-Draggable gives out is completely different from what getBoundingClientRect gives out. Here's a snippet of my code:
When I print out the values of both
ref.getBoundingClientRect()
from the component and that ofdata
are completely different. Is there any way to convert these values?