[Paraview] Zooming through the ParaViewWeb API

Sebastien Jourdain sebastien.jourdain at kitware.com
Wed Jul 1 19:09:03 EDT 2015


Scott is right, the x,y values are normalized, so depending on your screen
size if your image is 1000 pixel wide and you want to reflect a move of 10
pixel, you should send a x of 10/1000=0.01.

On Wed, Jul 1, 2015 at 4:28 PM, Scott Wittenburg <
scott.wittenburg at kitware.com> wrote:

> Here is a sample from my websocket frames just now:
>
>
> [48,4996973606207488,{},"viewport.mouse.interaction",[{"view":353,"action":"move","altKey":false,"ctrlKey":false,"shiftKey":false,"metaKey":false,"buttonLeft":false,"buttonMiddle":false,"buttonRight":true,"x":0.7654596100278551,"y":0.38173817381738173}]]
>
> It seems the "action" should be set to "move" rather than "none", as in
> the documentation you linked, "none" does not seem to be an option.  Also,
> as that documentation states, x and y should be normalized to [0, 1], as
> you correctly guessed.  And finally, you may need to provide all the
> parameters with values like I show above, not just the ones you are
> interested in.
>
> But at any rate, this should not then affect the center of rotation, but
> it sounds like in your case maybe it is?  Can you see if moving just a
> *tiny* bit keeps at least some of the object in view?
>
> Cheers,
> Scott
>
>
> On Wed, Jul 1, 2015 at 4:12 PM, Jordan Deyton <deytonjh at ornl.gov> wrote:
>
>> ParaViewWeb gurus,
>>
>> Is there a correct way to send a zoom request through the ParaViewWeb API?
>>
>> I'm especially looking at the PVW MouseHandler (documentation here --
>> http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/api/protocols.ParaViewWebMouseHandler
>> )
>>
>> I have had some success by sending a right-click with a small y value
>> (looks like it needs to be between 0 and 1), the action set to "none", and
>> buttonRight set to "true". However, when I afterward rotate the view (using
>> the same RPC call with different methods), the rendered object just
>> vanishes, although the axes and legend are still there.
>>
>> Jordan
>>
>> --
>> Jordan Deyton
>> Oak Ridge National Laboratory
>> Telephone: (865) 574-1091
>> Email: deytonjh at ornl.gov
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> 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:
>> http://public.kitware.com/mailman/listinfo/paraview
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> 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:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150701/5a22dd60/attachment.html>


More information about the ParaView mailing list