Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iv pan & zoom controls should be standard #306

Open
lgritz opened this issue Apr 10, 2012 · 11 comments
Open

iv pan & zoom controls should be standard #306

lgritz opened this issue Apr 10, 2012 · 11 comments
Labels
help wanted A task that is desired, but needs somebody to commit the effort to implement it. iv Image viewer

Comments

@lgritz
Copy link
Collaborator

lgritz commented Apr 10, 2012

Jeremy says: Pan and zoom should work the same as every other app. Middle mouse pans. Right mouse zooms. The 'bottom-left to top-right' diagonal should determine the zoom amount, such that moving the mouse either to the right or down zooms. Middle mouse scroll wheel should zoom, and lock to the nearest integer zoom size. +/- on keyboard should also step to next zoom size. (AND also map "=" to "+", so you dont have to hold down shift).

LG says: double check other important image apps to make sure that these assumptions are nearly universal before changing any current behaviors.

@jeremyselan
Copy link
Contributor

This interaction setup is basically referred to as 'maya' style. (They did it first)

Additional details:

  • Zoom is actually Alt + right click (forgot to mention the Alt)
  • Pan is both alt+middle mouse and plain middle mouse
  • This leaves plain right-click for popup menus, and left mouse unused.
  • (In 3d viewers, alt+left mouse does a tumble around the center of interest).
  • When you right click to zoom, the point you clicked on should stay stationary and be the zoom 'focus'.

Applications that use this control approach are:

  • Maya (both 2d + 3d)
  • Katana (in both 2D + 3D contexts)
  • itview (internal SPI image viewer)
  • Mari (both 2d + 3d)

Others?

Applications which do something different by default:

  • Silhoutte (Paint+Roto) uses middle/alt middle to pan, and scroll wheel zoom increment. But... uses shift middle to zoom.
  • Nuke defaults to middle mouse pan, and scroll wheel zoom increment. But... alt middle is zoom. Nuke also provides a user preference to switch controls to 'maya style' (our suggested approach) / Houdini / Lightwave. This implies those 3 apps have different control methods.

@jeremyselan
Copy link
Contributor

  • Frame cycler does middle mouse pan. Ctrl+middle mouse wheel for zoom increment. No way to do non-incremented zoom.
  • I spoke too soon about Houdini. Just launched version 11 and confirmed that it's controls match maya in both 2D + 3D contexts by default.

So it looks like middle mouse is universal for pan (independent of modifier keys). But that there's a bit of variation in how to trigger zoom. I personally prefer maya style, but am open to alternate suggestions.

@lgritz
Copy link
Collaborator Author

lgritz commented Apr 10, 2012

iv already supports the 'Alt' Maya zoom and pan controls.

We also support the right and left click to zoom and unzoom, which the Gelato 'iv' also did, because the Entropy 'iv' did it, because I wrote that I liked that behavior in the proprietary viewer of the studio I left the week before I wrote Entropy's iv.

I'm willing to reconsider the click-to-zoom behavior, but I don't want to remove it if it's not hurting anybody and we don't have anything particularly useful to use those clicks for.

@lgritz
Copy link
Collaborator Author

lgritz commented Apr 10, 2012

We already have middle mouse pan, Maya Alt-mouse zoom and pan, and mouse wheel zoom.

Since there's not cross-app agreement on much else, must we also remove the click-zoom? I vote no, unless there's a universal something to replace it with.

@jeremyselan
Copy link
Contributor

Oh I see! My mistake! iv does support middle mouse pan, but I never noticed due to the 'cant pan outside the image' #307. Apologies. (If you launch iv on an image that fits in your screen, and dont zoom, pan is locked).

So it looks like what's left to do is:

  • When you right click to zoom, the point you clicked on should stay stationary and be the zoom 'focus'. (Same with scroll wheel)
  • Fix the scroll wheel zoom increment (it's a bit small compared to other apps), and also have it lock to common zoom ratios.

I'm fine with leaving in click to zoom, though I would expect that pixels probes and/or context menus may want to steal those at some point.

Cool?

@jeremyselan
Copy link
Contributor

Wow, iv is way closer than I had remembered to maya-style. ;)

jeremyselan added a commit that referenced this issue Apr 10, 2012
removed edit menu
pan no longer clamps view to window
mouse scroll wheel zoom locks to pow2

Addresses #307
Partially addresses #306 (still some todos and cleanup needed)
Addresses #283
@jeremyselan
Copy link
Contributor

Still need to support the mouse focused centering.
Also, many applications hide the cursor during mouse zoom + pan. This is cool, and worth throwing in if easy.

@lgritz lgritz added the help wanted A task that is desired, but needs somebody to commit the effort to implement it. label Feb 14, 2024
@dadler
Copy link
Contributor

dadler commented Sep 5, 2024

I'm interested in working on this for ASWF Dev Days, Sep. 26-27, 2024. I have experience working on similar view manipulation code in other (proprietary) OpenGL-based viewers.

@dadler
Copy link
Contributor

dadler commented Sep 23, 2024

I'm planning to work this during Dev Days this week.

If I understand correctly, some of this ticket is already implemented. Remaining work includes:

  • For Alt+Right dragging, the center of zoom (fixed point) should be where the drag started.
  • Change left-click and right-click to zoom only on click but not on drag. Currently these do click-to-zoom when dragging, which is confusing.
    • Or we could remove click-to-zoom, but it sounds like @lgritz prefers to keep click-to-zoom unless we have another use for those gestures (such as a right-click menu).
  • Compare scroll wheel increment against other apps (eg maya, rv); adjust as appropriate.
  • Hide mouse pointer during drag (if not too hard).

Does that sound right?

Should I submit against the main branch?

@dadler
Copy link
Contributor

dadler commented Sep 28, 2024

I didn't make much progress on this during DevDays, working instead on fixing #4451, which prevented iv from working at all (at least on some Linux hosts). I still hope to work the present issue in the future, though it's fine if someone else wants to work it.

@lgritz
Copy link
Collaborator Author

lgritz commented Sep 28, 2024

You still got a PR accepted, @dadler, fixing a legit bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted A task that is desired, but needs somebody to commit the effort to implement it. iv Image viewer
Projects
None yet
Development

No branches or pull requests

3 participants