TheFantasticWarrior / chrome-extension-imagus

"Mirror" of the "Mirror" of the official Imagus source hosted on Google Drive. currently taking a break on this project
https://addons.mozilla.org/en-US/firefox/addon/imagus-mod/
220 stars 7 forks source link

Ability to return to auto sizing view from full zoom view #42

Open emoryy opened 1 year ago

emoryy commented 1 year ago

At the moment when entering the full zoom mode (either by mouse or keyboard shortcuts) there is no way to return to auto sizing mode.

When the full zoom mode is activated, one needs to exit/hide the popup, and hover over the link again to continue looking through the album in normal mode. Fortunately Imagus remembers the last position in the album, but navigating an album this way is still somewhat bothersome. It's also true that in full zoom mode it's still possible to navigate in the album with keyboard shortcuts, but then from that point on the zoom of every image needs to be adjusted manually. Both of these workarounds disrupt the flow of viewing an album.

Feature request: Allow returning to normal mode from full zoom mode by some method. It would be logical to just use same keyboard shortcuts for this as for activating the mode (Z or Enter by default), but maybe some users are accustomed to that currently these shortcuts exit the popup when in full zoom mode.

Idea regarding the mouse buttons: At the moment full zoom mode activation works either with clicking or holding the right mouse button. I guess returning to normal mode could also work with holding the right button, but hijacking the right click here would mean that the right click menu would be inaccessible.

But maybe clicking the middle button could work for both actions? As it seems currently the middle button doesn't do anything in Imagus. Maybe it could be added as an additional method for toggling between full zoom / auto zoom mode?

kuzn123 commented 1 year ago

I completely agree with the last paragraph (toggling between full zoom / auto zoom mode). This would be an important extension of the functionality and convenience when viewing albums. The middle mouse key is really not busy with anything and is ideal for such an action.

kuzn123 commented 1 year ago

I just tested a new feature for albums on Chrome and FF - everything works fine with default hotkeys. The return to normal mode occurs exactly on the current image. Great implementation! This will save a lot of time for users. Thank you very much!

kuzn123 commented 10 months ago

I have a small request for this functionality (it is generally convenient and I use it periodically). I would like to be able to switch from Full Zoom mode to normal mode not only with one "C" key, but also with the middle mouse button. Ideally, I would like to have an option in the hotkey settings with a key selection for this action.

emoryy commented 10 months ago

So I tried it out, and I seem to have some issues.

First, the return only happens for me when the mouse is positioned outside the image. If the cursor is hovered over the image, it just exits, just like before.

Second, about the behavior of the hotkey:

@kuzn123 it looks like it's actually possible to assign the middle mouse button to this function: in the settings you simply press the middle button when the input field is active, and the text "Mouse1" will appear, and it actually works.

However the problem is that in this case the middle click event won't be consumed by Imagus. This, in tandem with the previous problem can cause more issues, since the mouse cursor could be over whatever element on the page. For example in case of a link the middle click causes opening the link in a background tab as well. (While for example using the left mouse button to exit the full zoom view the click event is consumed, and won't cause the activation of any element you happened to hover with it.)

kuzn123 commented 10 months ago

it looks like it's actually possible to assign the middle mouse button to this function: in the settings you simply press the middle button when the input field is active, and the text "Mouse1" will appear, and it actually works.

Great, thanks for reminding me, I completely forgot that this option is already in the Settings.

However the problem is that in this case the middle click event won't be consumed by Imagus. This, in tandem with the previous problem can cause more issues, since the mouse cursor could be over whatever element on the page. For example in case of a link the middle click causes opening the link in a background tab as well. (While for example using the left mouse button to exit the full zoom view the click event is consumed, and won't cause the activation of any element you happened to hover with it.)

I now quickly checked the operation of the MMB (Mouse1) - everything works for me. Even if on some site sometimes something “accidentally opens” or “accidentally works”, imho this does not matter much compared to the usefulness and ease of use of this key. Viewing albums has become much more convenient for me.

PS Now I tried to set MMB in FF - it did not work...