<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Hi Rick,</div><div><br></div><div>Sorry I miss understood what you meant. </div><div>In your case you just need to use button: 1 for the pan manipulator like in Glance. </div><div><br></div><div>Seb</div><div><br>On Sep 4, 2018, at 07:29, Richard Frank <<a href="mailto:rickfrank@me.com">rickfrank@me.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">Thanks. </div><div><br></div><div>Question - I have this interactor style<div><a href="https://github.com/DominionSoftware/VTKPlugin">https://github.com/DominionSoftware/VTKPlugi</a>n/<span class="js-path-segment" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;"><a data-pjax="true" href="https://github.com/DominionSoftware/VTKPlugin/tree/master/lib" style="box-sizing: border-box; text-decoration: none;">lib</a></span><span class="separator" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;">/</span><span class="final-path" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box; font-weight: 600;">ohifInteractorStyleSlice.js</span></div><div><span class="final-path" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box; font-weight: 600;"><br></span></div><div><span class="final-path" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box; font-weight: 600;">Which handles zooming by dollying the camera...</span></div><div><span class="final-path" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box; font-weight: 600;"><br></span></div><div><span style="font-weight: 600;">The superclass has </span><span style="background-color: rgba(255, 255, 255, 0);"><span class="pl-smi" style="box-sizing: border-box;">States</span>.<span class="pl-c1" style="box-sizing: border-box;">IS_PAN</span>:</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">So it would seem that if I can get a center button drag event it would be simpler than creating a manipulator as a special case.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">The wheel also handles slice navigation.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div>The “usual” ( for better or worse ) way of panning on these medical slices is by holding down the wheel ( albeit without spinning it ) and dragging. </div><div><br></div><div>So....in my mind it would be the simplest path to handle States.IS_PAN by getting a center button event here and passing it to the super class.</div><div><br></div><div>Is there a browser or other event snafu that prevents the center button drag coming through directly to the interactor?</div><div><br></div><div>The superclass handles pan with a left drag and modifier combination, while we would like to use center button drag....</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Rick</div><div><br><div id="AppleMailSignature">Sent from my iPad</div><div><br>On Sep 3, 2018, at 11:18 PM, Sebastien Jourdain <<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">When you register a manipulator you need to specify when it should be applied, button (1,2,3), modifier (alt, shift, control). If you don't specify anything that will be the left button with no modifier.</div><div dir="ltr">Moreover, you can provide those flags to skip drag or scroll (<span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">scrollEnabled</span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">:</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre"> </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">true</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">, dragEnabled</span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">:</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre"> </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">false</span>)<br><div><br></div><div>Since that manipulator is only focusing on mouse drag, you will need to create another one that do something base on the scroll like here:</div><div><a href="https://github.com/Kitware/vtk-js/blob/master/Sources/Interaction/Manipulators/MouseCameraTrackballZoomManipulator/index.js#L70-L90">https://github.com/Kitware/vtk-js/blob/master/Sources/Interaction/Manipulators/MouseCameraTrackballZoomManipulator/index.js#L70-L90</a></div><div><br></div><div>You have that example that allow you to dynamically design the user interaction style</div><div><a href="https://github.com/Kitware/vtk-js/blob/master/Sources/Interaction/Style/InteractorStyleManipulator/example/index.js">https://github.com/Kitware/vtk-js/blob/master/Sources/Interaction/Style/InteractorStyleManipulator/example/index.js</a><br></div><div><br></div><div><a href="https://kitware.github.io/vtk-js/examples/InteractorStyleManipulator.html">https://kitware.github.io/vtk-js/examples/InteractorStyleManipulator.html</a><br></div><div><br></div><div><br><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 3, 2018 at 8:28 PM Richard Frank <<a href="mailto:rickfrank@me.com">rickfrank@me.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>In your case, you may have to implement a panManipulator that only deals with the mouse wheel/pinch. </div></div></div></blockquote><div><br></div><div><div>Do you mean a interactorStyle - hasA - Pan Manipulator?</div><div><br></div><div>I tried that and when I add the manipulator it seems to take over all the events…..I don’t get the left or right button - when I created the pan manipulator I only </div><div>assigned it center button (2)</div><div><br></div><div><br></div></div><blockquote type="cite"><div><div dir="ltr"><div>You can look at the zoom one which has an option to support the mouse wheel.</div></div></div></blockquote><div><br></div>Do you mean a zoom Manipulator?</div><div><br></div><div>I’ll experiment and post some code if I can’t get it working….</div><div><br></div><div>Thanks</div><div><br></div><div>Rick</div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>HTH,</div><div><br></div><div>Seb </div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 3, 2018 at 3:44 PM Richard Frank via vtkusers <<a href="mailto:vtkusers@public.kitware.com" target="_blank">vtkusers@public.kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
I want to use scroll wheel down for Pan in my interactor instead of a modifier key. What’s the best way to do this? I don’t see how to get it in an interactor style and if I add a PanManipulator it seems to take over all the mouse handling.<br>
<br>
What’s the relationship between an interactor and a manipulator?<br>
<br>
Thanks<br>
<br>
Rick Frank<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank">www.kitware.com</a><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/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>
</div></blockquote></div><br></div></blockquote></div>
</div></blockquote></div></div></div></div></div></blockquote></body></html>