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

Add zoom information to URL parameters #284

Open craigsapp opened 4 months ago

craigsapp commented 4 months ago

For the Zoom buttons:

Screenshot 2024-02-13 at 10 15 21

In the top navigation area, add URL parameters that give the scaling factor used to render the music. Something like Zo{150} for 150% of default size. The zoom buttons have a limited choice of zooming (about 10% increments geometrically), and this feature would allow the user to set a precise zoom factor if needed without the need to add an additional option on the configuration panel.

Default size:

https://polishscores.org/?id=pl-kk--kk-i-2--022

Screenshot 2024-02-13 at 10 18 38

25% size (hypothetical at the moment, so the Zo parameter is not recognized yet):

https://polishscores.org/?id=pl-kk--kk-i-2--022&con=Zo{25}

Screenshot 2024-02-13 at 10 21 12

Note that command-0 in MacOS or control-0 on PCs will currently reset the zoom factor to 100%

The zoom factor from the URL should be checked, and probably limited between 5% and 500% (or the maximum limits in verovio if they are smaller).