holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.73k stars 516 forks source link

VTK pane not playing well with PanelHTMLBoxView #987

Closed xavArtley closed 4 years ago

xavArtley commented 4 years ago

As an example we can notice vtkvolume panels are not well displayed in the developer documentation https://pyviz-dev.github.io/panel/reference/panes/VTKVolume.html#panes-gallery-vtkvolume I suppose it is due to the way the PanelHTMLBoxView compute the size of the panel content. As the vtk panels are filled after the computation of the layout they do not behave like other panes.

xavArtley commented 4 years ago

Sorry to reopen but I don't think the issue is solved:

import panel as pn
pn.extension('vtk')
dragon = pn.pane.VTK('https://raw.githubusercontent.com/Kitware/vtk-js/master/Data/StanfordDragon.vtkjs',
                     sizing_mode='stretch_both', height=400, enable_keybindings=True, orientation_widget=True,
                     serialize_on_instantiation=True)
dragon

result:

Expected result: samed as panel 0.7.0: image

philippjfr commented 4 years ago

I can't reproduce:

Screen Shot 2020-01-23 at 11 58 48 AM

Screen Shot 2020-01-23 at 11 57 38 AM

philippjfr commented 4 years ago

Hmm, I see, you're using 'stretch_both', missed that sorry.