craigsapp / website-polish-scores

Front-end for digital transcriptions of the Polish Music Heritage in Open Access project
https://polishscores.org
3 stars 1 forks source link

Zoom to full image #256

Open craigsapp opened 4 months ago

craigsapp commented 4 months ago

This score:

https://polishscores.org/?id=pl-kk--kk-i-482--002-004

is loaded in the full available size of the window:

Screenshot 2024-02-05 at 13 21 35

It would be useful to add a button above the center image icon:

Screenshot 2024-02-05 at 13 22 06

that will return to this view when you are zoomed in or out:

Screenshot 2024-02-05 at 13 22 33

The icon should be an empty box similar to the download button, but without an arrow and also the two halves of the box connected. This button would do two things: center the image and fit it to the display as when the page is first loaded. Perhaps also add a keyboard shortcut for clicking on this icon, such as the letter c.

In addition, a separate issue is that the zoom in/out via the mouse is a bit sensitive, so it is easy to overshoot the desired zoom using this method. If possible, decrease the sensitivity of mouse zooming.

craigsapp commented 4 months ago

A related issue would be to slight change the behavior of the zoom in/out icons:

Screenshot 2024-02-05 at 13 29 20

Currently the zoom in/out is centered at the top left corner of the image (or display area). Instead, the zoom in/out should be centered in the middle of the display window.

Example of clicking five times on the zoom in icon:

Screenshot 2024-02-05 at 13 30 46

Ideally the view should be towards the center of the visible area of the image, with this case being approximately:

Screenshot 2024-02-05 at 13 31 16

It might be nice to adjust the zoom in/out step size to 1/2 of the current amount (such as 5% if the current setting is 10%)

A nice feature to add is: if the image width is equal or smaller to the display size, then center the image in the window instead of letting something like this happen:

Screenshot 2024-02-05 at 13 33 42

Desired behavior would be instead:

Screenshot 2024-02-05 at 13 34 04

Or perhaps better would be to limit zoom out so that the image cannot get smaller that the display size. (This would help returning to the original view by pressing the zoom out until the original display of full width is reached.)

It would be useful to add keyboard shortcuts for zoom in/out, which would be + and -. For English keyboards at least, = would be useful to be an alias for - (since they are on the same key, and allowing = would allow not needing to press the shift key).