0 votes

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

in Solved by (390 points)
recategorized by

2 Answers

0 votes
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

by Skipper developer (141k points)
selected by
0 votes

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?

by Skipper developer (141k 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.

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