Skip to content

fix(drawing): Arrow keys visually pan canvas intuitively #356#3062

Open
afrdbaig7 wants to merge 1 commit intoMoganLab:mainfrom
afrdbaig7:afrdbaig7/200_27/fix_drawing_mode_arrows
Open

fix(drawing): Arrow keys visually pan canvas intuitively #356#3062
afrdbaig7 wants to merge 1 commit intoMoganLab:mainfrom
afrdbaig7:afrdbaig7/200_27/fix_drawing_mode_arrows

Conversation

@afrdbaig7
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The way the arrow keys work in the drawing mode is counterintuitive.

1 participant