-
assigned issue to
Scroll-zoom with modifier key
Allow zooming/unzooming toward/away-from cursor position (or center if cursor is not over the matrix) when a modifier key is held down. Another modifier key could indicate zoom toward/away-from selection.
Comments (10)
-
repo owner -
repo owner - changed status to on hold
On hold for same reason as #25.
-
reporter Scroll zooming already works for when you scroll sideways (on my magic mouse) and it looks OK, but it fixes the top-left corner instead of where the cursor is.
-
repo owner I know. The issue here is adjusting the view to where the cursor is. I have tried it and implemented it (had working code for
#10,#14and #25) and it just looks plain terrible in my opinion. I really like the idea though and I do think it's super important. But to make it smooth looking you'd have to change everything related to GlobalView and how the tiles are drawn. The scrollbars are tied to the tile number and you can only adjust the view by moving whole tile steps.When you do scroll-zoom now, you're not actually moving the view as it normally should be. All of our zooming code is just increasing the scale of the tiles (changing the side lengths of the tiles). The increments/ decrements in side length are such that the side length in pixels divided by the number of available pixels on screen is a whole number.
For smooth zooming and cursor following (in essence adjusting the scrollbars) you'd need to be able to display partial tiles. All of the issues I put on hold in relation to this would be very few lines of code to implement if we drew to a panel on a JScrollPane. I tried this and there's a lot of refactoring needed to achieve this.
If you want to, I can upload a JAR later today or tomorrow with the double-click to zoom on cursor code working.
-
reporter I was thinking about this, and I think we may not have to change the way globalview works. Instead of zooming one row/col at a time, zoom 2 rows/cols at a time (one row on the top and one row on the bottom for example). If there are an odd number of rows/cols, then yeah, there would be an image shift at the end.
-
reporter - changed status to open
Already implemented this - opening to close.
-
reporter - changed status to resolved
Option-scroll now zooms toward/from the cursor position.
-
reporter - changed status to closed
Merged to master.
-
reporter - changed status to resolved
Resolved issue 18 of pull request #133 - explained the math behind the translation of the labels after rotation.
→ <<cset 02ca0f6fa833>>
-
reporter - changed status to closed
BB changed the status incorrectly based on a PR comment.
- Log in to comment