[Paraview] vtk renderer

Sgouros, Thomas thomas_sgouros at brown.edu
Thu Jun 7 13:41:19 EDT 2018


Hi All:

I'm not sure if this is a VTK question or a Paraview question, so apologies
in advance. In a ParaViewWeb application, I have a vtkRenderer in a div in
another div, etc. The vtkRenderer seems to adjust when I make the window
it's in bigger or the container, but it does not resize when I make the
window smaller. Using the browser's element viewer, I can see the <canvas>
object inside, and see its width reach when I expand elements and refuse to
react when I contract the window or container.

When I create the vtk renderer, I use this code:

           this.renderers.push(VtkRenderer.newInstance({
                  client: this.model.pvwClient,
                  viewId: result,
                }) );

    ... and then later...

      SizeHelper.onSizeChange(() => {
        this.renderers[0].resize();
        this.renderers[1].resize();
      });
      SizeHelper.startListening();

I invoke the SizeHelper.triggerChange() method regularly and it seems to
work, though again only to make the renderer bigger.

Should I be resizing these with a direct call to some method? What is the
way I should be doing this?

Thank you,

 -Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180607/0580b668/attachment.html>


More information about the ParaView mailing list