Re: [Paraview] vtk renderer question

2018-06-26 Thread Sgouros, Thomas
Brilliant. I knew I was doing something dumb. Thank you.

 -Tom

On Tue, Jun 26, 2018 at 10:37 AM, Sebastien Jourdain <
sebastien.jourd...@kitware.com> wrote:

> The reason why it is not working is because you removed the container of
> the renderer from the DOM.
> Therefore, you will have to set its container again... Basically it is
> rendering somewhere in a detached DOM element.
>
> You can do that, or simply use CSS to hide that DOM element.
>
> On Tue, Jun 26, 2018 at 8:15 AM Sgouros, Thomas 
> wrote:
>
>> Hi All:
>>
>> I have a vtk renderer in a ParaViewWeb application. I create it and then
>> attach it to a container for display using the setContainer() method.
>>
>> this.renderers.push(VtkRenderer.newInstance({
>>   client: this.model.pvwClient,
>>   viewId: result,
>> }) );
>> this.renderers[this.renderers.length - 1].setContainer(
>>   document.getElementById(container));
>>
>> This renders fine, and I can see the  I created and the 
>> inside it that appears to be the vtkRenderer.
>>
>> When I render the container invisible (through the click of a user
>> button) in the render function of its container, it disappears obediently,
>> but when I make it visible again, the canvas inside my container is
>> missing. Not zero size, just not present. I tried explicitly calling the
>> render() method of the vtkRenderer object, but that doesn't seem to do
>> anything.
>>
>> Here's what I'm doing:
>>
>> {
>>   this.rendererTwoVisible = !this.rendererTwoVisible;
>>   if (this.rendererTwoVisible) this.renderers[1].render(); //
>> Doesn't do anything.
>> }}>
>>...
>> { this.rendererTwoVisible ? (
>>   >width: '50%',
>>   }}>
>> >  view={this.renderers[1]?this.
>> renderers[1].getViewId():""}
>> />
>> >  style={{position: 'relative',
>>  height: '80vh',
>>  resize: 'both',
>>  overflow: 'hidden',
>>  zIndex: '10',
>> }}
>> />
>>   
>> ) : null }
>>
>> I feel like there is a render method I should be calling directly
>> somewhere, but can't figure out what or where that should be. Any
>> suggestions welcome,
>>
>> Thank you,
>>
>>  -Tom
>>
>>
>> ___
>> Powered by www.kitware.com
>>
>> ParaView discussion is moving! Please visit https://discourse.paraview.
>> org/ for future posts.
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/
>> opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> https://public.kitware.com/mailman/listinfo/paraview
>>
>
___
Powered by www.kitware.com

ParaView discussion is moving! Please visit https://discourse.paraview.org/ for 
future posts.

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] vtk renderer question

2018-06-26 Thread Sebastien Jourdain
The reason why it is not working is because you removed the container of
the renderer from the DOM.
Therefore, you will have to set its container again... Basically it is
rendering somewhere in a detached DOM element.

You can do that, or simply use CSS to hide that DOM element.

On Tue, Jun 26, 2018 at 8:15 AM Sgouros, Thomas 
wrote:

> Hi All:
>
> I have a vtk renderer in a ParaViewWeb application. I create it and then
> attach it to a container for display using the setContainer() method.
>
> this.renderers.push(VtkRenderer.newInstance({
>   client: this.model.pvwClient,
>   viewId: result,
> }) );
> this.renderers[this.renderers.length - 1].setContainer(
>   document.getElementById(container));
>
> This renders fine, and I can see the  I created and the 
> inside it that appears to be the vtkRenderer.
>
> When I render the container invisible (through the click of a user button)
> in the render function of its container, it disappears obediently, but when
> I make it visible again, the canvas inside my container is missing. Not
> zero size, just not present. I tried explicitly calling the render() method
> of the vtkRenderer object, but that doesn't seem to do anything.
>
> Here's what I'm doing:
>
> {
>   this.rendererTwoVisible = !this.rendererTwoVisible;
>   if (this.rendererTwoVisible) this.renderers[1].render(); //
> Doesn't do anything.
> }}>
>...
> { this.rendererTwoVisible ? (
>   width: '50%',
>   }}>
> 
>  view={this.renderers[1]?this.renderers[1].getViewId():""}
> />
>   style={{position: 'relative',
>  height: '80vh',
>  resize: 'both',
>  overflow: 'hidden',
>  zIndex: '10',
> }}
> />
>   
> ) : null }
>
> I feel like there is a render method I should be calling directly
> somewhere, but can't figure out what or where that should be. Any
> suggestions welcome,
>
> Thank you,
>
>  -Tom
>
>
> ___
> Powered by www.kitware.com
>
> ParaView discussion is moving! Please visit
> https://discourse.paraview.org/ for future posts.
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview
>
___
Powered by www.kitware.com

ParaView discussion is moving! Please visit https://discourse.paraview.org/ for 
future posts.

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


[Paraview] vtk renderer question

2018-06-26 Thread Sgouros, Thomas
Hi All:

I have a vtk renderer in a ParaViewWeb application. I create it and then
attach it to a container for display using the setContainer() method.

this.renderers.push(VtkRenderer.newInstance({
  client: this.model.pvwClient,
  viewId: result,
}) );
this.renderers[this.renderers.length - 1].setContainer(
  document.getElementById(container));

This renders fine, and I can see the  I created and the 
inside it that appears to be the vtkRenderer.

When I render the container invisible (through the click of a user button)
in the render function of its container, it disappears obediently, but when
I make it visible again, the canvas inside my container is missing. Not
zero size, just not present. I tried explicitly calling the render() method
of the vtkRenderer object, but that doesn't seem to do anything.

Here's what I'm doing:

{
  this.rendererTwoVisible = !this.rendererTwoVisible;
  if (this.rendererTwoVisible) this.renderers[1].render(); //
Doesn't do anything.
}}>
   ...
{ this.rendererTwoVisible ? (
  


  
) : null }

I feel like there is a render method I should be calling directly
somewhere, but can't figure out what or where that should be. Any
suggestions welcome,

Thank you,

 -Tom
___
Powered by www.kitware.com

ParaView discussion is moving! Please visit https://discourse.paraview.org/ for 
future posts.

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview