Files
iD/modules
Martin Raifer 19adc5cd54 consistently round non-integer initial zoom when zooming in/out
…when using the zoom buttons or +/- keyboard shortcuts (i.e. does not affect the mouse-wheel/pinch zooming)

Also: make zoom in/out transition slightly faster.

In sum, this allows to zoom in/out multiple levels in quick succession, and using the zoom buttons should be more intuive: they don't snap to very-close zoom levels anymore (e.g. hitting `+` when the current zoom was 15.97 would previously result in a final zoom of 16.00, which is not really what a user would need. Now the zooming in results in a final zoom level of 17.00, which is "actually properly zoomed in".

initial zoom | operation | final zoom (new) | final zoom (old code)
----- | --- | ----- | -----
16.00 | `+` | 17.00 | 17.00
16.00 | `-` | 15.00 | 15.00
16.10 | `+` | 17.00 | 17.00
16.10 | `-` | 15.00 | 15.00
15.90 | `+` | 17.00 | 16.00
15.90 | `-` | 15.00 | 14.00
2025-04-26 21:10:16 +02:00
..
2024-07-08 17:15:38 -07:00
2020-10-13 17:05:29 -04:00
2024-09-03 19:23:21 +10:00