<div dir="ltr">Brilliant. I knew I was doing something dumb. Thank you.<div><br></div><div> -Tom</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 26, 2018 at 10:37 AM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The reason why it is not working is because you removed the container of the renderer from the DOM. <div>Therefore, you will have to set its container again... Basically it is rendering somewhere in a detached DOM element.</div><div><br></div><div>You can do that, or simply use CSS to hide that DOM element.</div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Tue, Jun 26, 2018 at 8:15 AM Sgouros, Thomas <<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi All:<div><br></div><div>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.</div><div><br></div><div><div>                this.renderers.push(<wbr>VtkRenderer.newInstance({</div><div>                  client: this.model.pvwClient,</div><div>                  viewId: result,</div><div>                }) );</div><div>                this.renderers[this.renderers.<wbr>length - 1].setContainer(</div><div>                  document.getElementById(<wbr>container));</div></div><div><br></div><div>This renders fine, and I can see the <div> I created and the <canvas> inside it that appears to be the vtkRenderer.</div><div><br></div><div>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.</div><div><br></div><div>Here's what I'm doing:</div><div><br></div><div><div>        <button onClick={()=>{</div><div>          this.rendererTwoVisible = !this.rendererTwoVisible;</div><div>          if (this.rendererTwoVisible) this.renderers[1].render(); // Doesn't do anything.</div><div>        }}></div></div><div>   ...</div><div><div>        { this.rendererTwoVisible ? (</div><div>          <div style={{display: 'table-cell',</div><div>                       width: '50%',</div><div>                      }}></div><div>            <MyControlPanel model={this.model}</div><div>                                         view={this.renderers[1]?this.<wbr>renderers[1].getViewId():""}<br></div><div>            /></div><div>            <div id="renderContainerTwo"</div><div>                 style={{position: 'relative',</div><div>                             height: '80vh',</div><div>                             resize: 'both',</div><div>                             overflow: 'hidden',</div><div>                             zIndex: '10',</div><div>                        }}</div><div>            /></div><div>          </div></div><div>        ) : null }</div></div><div><br></div><div>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,</div><div><br></div><div>Thank you,</div><div><br></div><div> -Tom</div><div><br></div><div><br></div></div></div></div>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
ParaView discussion is moving! Please visit <a href="https://discourse.paraview.org/" rel="noreferrer" target="_blank">https://discourse.paraview.<wbr>org/</a> for future posts.<br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
</blockquote></div>
</blockquote></div><br></div>