Vtk-js: GenericRenderWindow does not call setContainer on init

Created on 26 Feb 2019  路  1Comment  路  Source: Kitware/vtk-js

Hello!

The issue we are having is that GenericRenderWindow doesn't seem to act like FullScreenRenderWindow. It always seems to need to be resized first or interacted with before the data appears. It looks like it might be because it does not call setContainer on initialization.

https://github.com/Kitware/vtk-js/blob/master/Sources/Rendering/Misc/GenericRenderWindow/index.js
https://github.com/Kitware/vtk-js/blob/master/Sources/Rendering/Misc/FullScreenRenderWindow/index.js#L67

We've worked around this by adding some .resize() calls when creating everything. It is a bit weird though so I will probably fix it and send a PR soon.

Most helpful comment

Yes that's expected. The generic one offload to the user to set the container (no default as it is not suppose to be full screen) and once you set the container or when you affect it's size (since you are in control), you have to call resize(). The full screen one take those requirement off from the user has when you are fullscreen you can easily create a container for it that will spread to the window size and bind the resize on the window size change event.

If your container has a fixed size, affecting the window size, won't affect that container size therefore we do not make that binding automatically.

>All comments

Yes that's expected. The generic one offload to the user to set the container (no default as it is not suppose to be full screen) and once you set the container or when you affect it's size (since you are in control), you have to call resize(). The full screen one take those requirement off from the user has when you are fullscreen you can easily create a container for it that will spread to the window size and bind the resize on the window size change event.

If your container has a fixed size, affecting the window size, won't affect that container size therefore we do not make that binding automatically.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doczoidberg picture doczoidberg  路  5Comments

xavArtley picture xavArtley  路  4Comments

MHadavand picture MHadavand  路  6Comments

mix3d picture mix3d  路  6Comments

rjsgml5698 picture rjsgml5698  路  4Comments