[Paraview] PV Web scrollwheel for zoom, wrong legend

Daniel Zuidinga info at seoaachen.de
Wed Aug 17 17:18:13 EDT 2016


shouldn't work scroll wheel in vtk.js? e.g. here 
https://kitware.github.io/vtk-js/examples/HttpSceneLoader.html
I have to compile the whole sources? I use pv of salome meca. I hope it 
isn't to complicated and cpu intensive.

Am 17.08.2016 um 22:32 schrieb Sebastien Jourdain:
> I guess ParaView is missing more code on the server side. ;-)
> This time, it will be in the C++.
>
>
> ${ParaView-src}/VTK/Web/Core/vtkWebApplication.cxx => 
> vtkPVWebApplication::HandleInteractionEvent
>
> vs
>
> ${ParaView-src}/Web/Core/vtkPVWebApplication.cxx => 
> vtkWebApplication::HandleInteractionEvent
>
> The VTK one has:
>
>   // Handle scroll action if any
>   if(event->GetScroll()) {
>     iren->SetEventInformation(0, 0, ctrlKey, shiftKey, 
> event->GetKeyCode(), 0);
>     iren->MouseMoveEvent();
>     iren->RightButtonPressEvent();
>     iren->SetEventInformation(0, event->GetScroll()*10, ctrlKey, 
> shiftKey, event->GetKeyCode(), 0);
>     iren->MouseMoveEvent();
>     iren->RightButtonReleaseEvent();
>     this->Internals->ImageCache[view].NeedsRender = true;
>     return true;
>   }
>
> If you got it working, could you submit a pull request on our gitlab 
> and assign it to me so those fix could be part of PV 5.2?
>
> Thanks,
>
> Seb
>
> On Wed, Aug 17, 2016 at 2:08 PM, Daniel Zuidinga <info at seoaachen.de 
> <mailto:info at seoaachen.de>> wrote:
>
>     I added the lines but scroll wheel does not work
>
>
>         Look at ${pv_src}/Web/Python/paraview/web/protocols.py
>         #ParaViewWebMouseHandler
>         vs ${pv_src}/VTK/Web/Python/vtk/web/protocols.py
>          #vtkWebMouseHandler
>
>         it seems the paraview one is missing:
>
>               if event.has_key("scroll"):
>                     pvevent.SetScroll(event["scroll"])
>
>         Just add it to your paraview python file.
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160817/3ea12b7b/attachment.html>


More information about the ParaView mailing list