Skip to content
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

Hold 'Ctrl' or 'Shift' key to move only in one direction #424

Open
kaixoo opened this issue Jan 17, 2025 · 2 comments
Open

Hold 'Ctrl' or 'Shift' key to move only in one direction #424

kaixoo opened this issue Jan 17, 2025 · 2 comments

Comments

@kaixoo
Copy link

kaixoo commented Jan 17, 2025

I don't know if this feature is already implemented (possibly is, since I saw it somewhere in the code). Other programs have a feature where you can move an object in only one axis. In Inkscape it's Ctrl, in Figma it's Shift.

I think I saw it somewhere in TransformAnimator, but in the scale property, where there was a prop "onlyXAxis" and "onlyYAxis" and there you would scaleX/Y += scaleBy;. In this case, do the same but for moving.

There's one more thing: the original position of the object is reserved a special place and you can return to it easily by snapping. I don't know how this would look like in code.

@throwing-shade
Copy link

throwing-shade commented Jan 18, 2025

It's already implemented; you just click the object you want to move, press G and then press the letter of the axis you want to move it on (so the X and Y key for the x and y axes).
Left-clicking confirms the new position and right-clicking sends the selected object(s) back to their initial position.

@kaixoo
Copy link
Author

kaixoo commented Jan 18, 2025

Oh, alright. Can we implement it with just 'Ctrl' or Shift like all other applications?

If not, a message in the statusbar could help, like on Inkscape:

Image

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

No branches or pull requests

2 participants