Skip to content

Implement nudging selected layers with arrow keys #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 12, 2021

Conversation

henryksloan
Copy link
Contributor

@henryksloan henryksloan commented Jul 11, 2021

Fixes #201

  • Added arrow keys to Key enum and WASM key translator
  • Added NudgeSelectedLayers Document message with x and y components
  • Handled the new message, transforming the selected layers by the given components
  • Added input entries for shift and non-shift variants of the command

This change is Reviewable

@0HyperCube
Copy link
Member

0HyperCube commented Jul 11, 2021

@henryksloan One of the rust things seems to not like 2f64.sqrt() and instead wants std::f64::consts::SQRT_2 saying calls in constants are limited to constant functions. This should be an easy fix.

Edit: Wrong language :)

@henryksloan
Copy link
Contributor Author

@0HyperCube Oh yeah, that const slipped my mind. Fixed.

@Keavon Keavon merged commit 3fc7722 into GraphiteEditor:master Jul 12, 2021
Keavon pushed a commit that referenced this pull request Jun 16, 2022
* Implement nudging selected layers with arrow keys

* Normalize diagonal nudges and add constants

* Replace sqrt(2.0) with a constant

* Remove normalization of diagonal movement
Keavon pushed a commit that referenced this pull request Jul 30, 2023
* Implement nudging selected layers with arrow keys

* Normalize diagonal nudges and add constants

* Replace sqrt(2.0) with a constant

* Remove normalization of diagonal movement
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.

Nudge the selected layers around the canvas with the arrow keys
3 participants