Mouse wheel fine and ultrafine zoom - #6026
Open
PaulMurrayCbr wants to merge 6 commits into
Open
Conversation
…t the unit tests cover the changed lines.
…s shift a little because of the finer resolution.
…s shift a little because of the finer resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
#6025
Description of the Change
net.rptools.maptool.client.ui.Scale is altered so that the integer 'zoomLevel' is now in ultrafine units being the existing scaleIncrement / 24 / 24.
Existing methods updated so that functionality is preserved. zoomIn internally zooms by 24*24 ultrafine units
Added zoomInFine, zoomOutFine, zoomInUltrafine and zoomOutUltrafine.
Altered DefaultTool to use fine and ultrafine on ctrl or ctrl-alt mousewheel.
Possible Drawbacks
GridTool hijacks the mouse wheel altogether and uses ctrl-mousewheel to zoom the view rather than zooming the grid. So, ctrl-mousewheel behaves differently in the grid view than the default view.
Might want to alter the behaviour of GridTool to use (say) capslock to switch between grid and map sizing. Could have used the windows key to select fine zoom - but it's not approprite: the windows key is for system things. Shift is already taken. I have taken the conservative option and not messed with GridTool.
The change does not add this functionality to the -/= keys or the zoom menu, so this functionality is only available with the mousewheel. I couldn't quite figure out how to get the Action classes to play nicely with ctrl and ctrl-alt, so I have not messed with that either. Particularly difficult in view of how - ideally - we'd want the JMenuItem to also work with the modifier keys.
Documentation Notes
User docs on zooming with the mousewheel need to mention that ctrl-mousewheel and ctrl-alt-mousewheel give a fine and ultrafine zoom, permitting (as per the feature request) a projected map to better match a physical size.
Release Notes
This change is