RobotWebTools / ros3djs

3D Visualization Library for use with the ROS JavaScript Libraries
https://robotwebtools.github.io/ros3djs
Other
365 stars 215 forks source link

Adaptative Viewer #276

Open Kad91 opened 5 years ago

Kad91 commented 5 years ago

The current options for the size of the viewer are width and height. Is there a way to make a viewer adaptative ? I mean display all the viewer even if the size of the screen changes.

Example : I used width : 2000 and height : 1338. This permits me to see the scene on the whole screen when it is extended but not when I reduce it

J-Rojas commented 5 years ago

I've solved this in my app code. You'll have to detect resize changes to the DOM, then call viewer.resize(width, height).