occivink / mpv-image-viewer

Configuration, scripts and tips for using mpv as an image viewer
The Unlicense
284 stars 23 forks source link

Can you add a option for pan-to-drag to lock to image? #12

Closed fire838 closed 4 years ago

fire838 commented 4 years ago

Please add a option for pan-to-drag to not go out of borders, like Irfanview when zoomed and fullscreened. I know pan-follows-cursor exist but it's not as smooth as pan-to-drag.

Included a video if you don't understand: https://streamable.com/pm6q2

occivink commented 4 years ago

that makes sense, I will look into it

occivink commented 4 years ago

You can set the margin option to 0 if you want the same behavior as with irfanview

fire838 commented 4 years ago

Good job.

Can you add a option to keep the image locked in centre and only allow to pan (edit: up and down if left and right margins shown or left and right if top & down margin shown) (full screened). But allow to pan all 4 direction when really zoomed, no margins shown (how it is right now).

Refer to Irfanview fullscreen mode.

occivink commented 4 years ago

So a drag-to-pan counterpart to pan_follows_cursor_move_if_full_view? Is there a need for allowing up-down if the image is entirely visible? I don't really feel like special-casing up-down versus left-right

fire838 commented 4 years ago

Don't allow the image to be dragged around the margins at all by locking it in the centre. Pretty much its making pan-to-drag behave exactly like pan-follows-cursor.