[Solved] Move viewport with right mouse button

0 votes
asked Nov 28, 2012 in Solved by fchris82 (390 points)
recategorized Jan 21, 2013 by ludek.vodicka

It's very comfortable in XnView to move image with right mouse button! Can you implement this in the ORM Designer as well?

2 Answers

0 votes
answered Jan 18, 2013 by ludek.vodicka Skipper developer (140,450 points)
selected Jul 30, 2014 by Martin Freki Stradej
 
Best answer

We haven't found any easy way how to overload right-click events to perform moving a viewport, but we implemented another way (Similar feature was implemented also in original ORMD).

You can hold space key to use temporary MoveViewport tool and move with model by using left mouse button. As soon as you release space key, original tool will be restored.

http://screencast.com/t/aAB0ujbuo9

0 votes
answered Dec 5, 2012 by ludek.vodicka Skipper developer (140,450 points)

It's an interesting idea.

I'm not familiar with XnView how to distinguish between Right-click to execute context menu and Right-click to move with viewport?

commented Jan 17, 2013 by jwagner (3,630 points)

I think Right-click will move the viewport (dragstart / dragend events in Javascript) and context menu only opens on immediate release (no dragstart fired). Don't know whether that's a feature of C++ or the libs you use, but a very low level approach could also be to decide "onmouseup" (again, Javascript terms as I'm not familiar with the C++ equivalent) how much the mouse has moved and if it's below some threshold (10 pixels?) it's considered a right-click to open the context menu, anything else moves the viewport.

commented Jan 17, 2013 by ludek.vodicka Skipper developer (140,450 points)

I'm not sure if this is possible. I will consult it with guy who works on diagram component and let you know.

...