Viewer resize problem


I’m having issues with resizing the viewer in React. When I modify the size of the div and call the viewer.resize() function, it resizes the canvas, but distorts the model.


Can you provide a solution for this?

Thank you in advance for your responses!

1 Like

Hi @Gircsi117, theoretically that should work, but we’re unfamiliar with react itself and how it handles DOM elements. We have a global window resize handler in the viewer that should take care of this on the window level.

Could you share a bit more of the code? Does the viewer get its correct proportions after a window resize?