fix(drawing): Arrow keys visually pan canvas intuitively #356#3062
Open
afrdbaig7 wants to merge 1 commit intoMoganLab:mainfrom
Open
fix(drawing): Arrow keys visually pan canvas intuitively #356#3062afrdbaig7 wants to merge 1 commit intoMoganLab:mainfrom
afrdbaig7 wants to merge 1 commit intoMoganLab:mainfrom
Conversation
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.
fixes #356
This PR fixes the unintuitive arrow key behavior in drawing mode, where pressing a direction key resulted in movement opposite to what users expect. The issue was caused by directly modifying the origin coordinates, which inverted the perceived direction of movement on screen. With this change, arrow key input now follows standard visual direction semantics—pressing left moves the content left, right moves it right, up moves it up, and down moves it down—bringing the behavior in line with common graphics tools like Inkscape. In addition to correcting the direction mapping, the fast movement functions have been refactored using a scaling helper to remove duplication and ensure consistent behavior. A centralized movement helper was also introduced to make the logic easier to maintain and extend in the future. The changes have been tested across normal and fast movement, different zoom levels, and continuous key presses, and verified to be consistent with mouse drag interactions. No regressions were observed in object manipulation, selection movement, or undo/redo functionality. The scope of this change is limited to drawing mode and does not affect the underlying coordinate system, making the overall risk low while significantly improving usability and consistency