AddController in vtkGenericRenderWindow

Hey I want to add a Button (Zoom and pan ) in a vtkGenericRenderWindow below the actual actor I’m displaying, I tried to do that but it doesn’t work and I don’t know what to do:

const ZoomPan = () =>{

grw.addController(ZoomPan); //grw is a vtkGenericRenderWindow

PS: it works for fullScreenRenderer as I saw it in the vtk.js docs

You have to do it yourself. fullScreenRenderer provide such API to simplify the examples code.
vtk.js does not aim to provide API for controlling the HTML structure like Vue or React does.

You can see the code here for reference on how we add HTML element within a full screen setup.

1 Like

Thank you, this was usefull to me