Thank you for seeking help! Our friendly community is here to assist you.
To assist you better, please consider providing:
Hi everyone!
Objective: I am trying to use the viewer package inside a page of a react application. The page is structure with some elements on the left, and I have positioned the viewer occupying a portion of the page to the right, aka its not positioned with position:absolute;
Issue: I cannot get the zoom to work properly. It’s zooming towards an arbitrary point (which is not the position of the mouse or the center of the model). Double clicking an element to recenter does not fix the issue.
I am using the viewer package "@speckle/viewer": "^2.20.1",
Could you think that this is an issue with the viewer package? Does it assume that the position of the div that contains the viewer must be absolute? In all the examples I have seen that the div has this style: "width:100%;height:100%;left:0px;top:0px;position:absolute
but I want to position the viewer on one side of the page.
I believe this setup should help the viewer’s zoom and centering work properly while keeping your layout intact. I have no idea what this looks like in React-land.