mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-22 19:08:39 +00:00
Keyboard Shortcuts: each Align and Distribute button of the Align panel can be given a key
Squashed from #3317 onto main.
This commit is contained in:
1 parent
5e24e59bd3
commit
9c20027778
6 files changed
+350
-24
No files matched your search
+12
@@ -2312,6 +2312,18 @@ included. With `spacing: 0`, `object.distribute` puts every line on the guide. A
|
||||
everything where it is, as `object.align` does. `to: "selection"` or `"artboard"` distributes without the key guide
|
||||
as the key, as with `object.align`, and without `spacing` a key guide is spaced as any selected guide.
|
||||
|
||||
Each button of the Align panel's Align Objects, Distribute Objects and Distribute Spacing rows is also a UI command
|
||||
that takes no params and runs what a click on the button runs: `align.horizontalLeft`, `align.horizontalCenter`,
|
||||
`align.horizontalRight`, `align.horizontalVerticalCenter`, `align.verticalTop`, `align.verticalCenter`,
|
||||
`align.verticalBottom`, `align.distributeVerticalTop`, `align.distributeVerticalCenter`,
|
||||
`align.distributeVerticalBottom`, `align.distributeHorizontalLeft`, `align.distributeHorizontalCenter`,
|
||||
`align.distributeHorizontalRight`, `align.distributeVerticalSpace` and `align.distributeHorizontalSpace`. The Align
|
||||
commands send `to: "key"` while the selection has a key, else `"artboard"` for one selected object without selected
|
||||
anchor points, else the Align To choice. The Distribute commands send `to: "key"` while the selection has a key, else
|
||||
the Align To choice, and while there is a key object or a key guide they send the panel's Distribute Spacing value as
|
||||
`spacing`. Edit › Keyboard Shortcuts lists them under Align, with no default shortcut, and
|
||||
`shortcuts.set {id, shortcut}` gives one a shortcut.
|
||||
|
||||
The desktop app adds its active artboard, the one the Artboards panel highlights, to the `object.align`,
|
||||
`object.distribute`, `object.distributeSpacing` and `select.allOnArtboard` calls it runs without `artboard`, as it does
|
||||
for `edit.pasteInPlace`, `edit.pasteInFront` and `edit.pasteInBack`, and to each `command.batch`. A batch passes its
|
||||
|
||||
Reference in new issue
Block a user