You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constonFinishDrawing=(event: OnSelectEnd)=>{const{ rect }=event;const{width: w,height: h, left, top }=rect;annotate(image?.id,left,top,w,h);};
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: