mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Add alignment of selected layers (#296)
* Add alignment of selected layers * Refactor alignment to a document message * Condense align messages into a tuple variant * Rename dimension to axis and fix redundant math * Add correct Center alignment * Add TODO comment for nested transforms * Add TODO for merging bounding boxes * Move align enums to document_message_handler * Run cargo clippy * Clean up unwraps with filter_map
This commit is contained in:
committed by
Keavon Chambers
parent
52fe66b6d8
commit
1055a0a05f
@@ -38,7 +38,7 @@ interface IconButtonOption {
|
||||
kind: "IconButton";
|
||||
icon: string;
|
||||
title: string;
|
||||
message?: string;
|
||||
message?: string | object;
|
||||
}
|
||||
|
||||
interface SeparatorOption {
|
||||
@@ -87,15 +87,15 @@ export default defineComponent({
|
||||
[
|
||||
"Select",
|
||||
[
|
||||
{ kind: "IconButton", icon: "AlignLeft", title: "Align Left" },
|
||||
{ kind: "IconButton", icon: "AlignHorizontalCenter", title: "Align Horizontal Center" },
|
||||
{ kind: "IconButton", icon: "AlignRight", title: "Align Right" },
|
||||
{ kind: "IconButton", icon: "AlignLeft", title: "Align Left", message: { Align: ["X", "Min"] } },
|
||||
{ kind: "IconButton", icon: "AlignHorizontalCenter", title: "Align Horizontal Center", message: { Align: ["X", "Center"] } },
|
||||
{ kind: "IconButton", icon: "AlignRight", title: "Align Right", message: { Align: ["X", "Max"] } },
|
||||
|
||||
{ kind: "Separator", type: SeparatorType.Unrelated },
|
||||
|
||||
{ kind: "IconButton", icon: "AlignTop", title: "Align Top" },
|
||||
{ kind: "IconButton", icon: "AlignVerticalCenter", title: "Align Vertical Center" },
|
||||
{ kind: "IconButton", icon: "AlignBottom", title: "Align Bottom" },
|
||||
{ kind: "IconButton", icon: "AlignTop", title: "Align Top", message: { Align: ["Y", "Min"] } },
|
||||
{ kind: "IconButton", icon: "AlignVerticalCenter", title: "Align Vertical Center", message: { Align: ["Y", "Center"] } },
|
||||
{ kind: "IconButton", icon: "AlignBottom", title: "Align Bottom", message: { Align: ["Y", "Max"] } },
|
||||
|
||||
{ kind: "Separator", type: SeparatorType.Related },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user