I am trying to "reacreate" the Moveable demo where you draw new moveables using Selecto.
However, I am unable to get the correct Selecto size and position after InviniteViewer is zoomed in.
I have this function being called in onSelectEnd:
How can I get the correct measurements, relative to this image? As you can see from my snippet, I have a Box wrapper around the image and I do have the real image width and height.
Environments
Description
I am trying to "reacreate" the Moveable demo where you draw new moveables using Selecto. However, I am unable to get the correct Selecto size and position after InviniteViewer is zoomed in. I have this function being called in
onSelectEnd
:But it returns incorrect left and top, even when fully zoomed out; they are relative to the screen, even though there is a
dragContainer
.How can I get the correct measurements, relative to this image? As you can see from my snippet, I have a
Box
wrapper around the image and I do have the real image width and height.