GraphiteEditor / Graphite

2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow.
https://graphite.rs
Apache License 2.0
9.38k stars 452 forks source link

Alignment button options (align to artboard) #1720

Open Keavon opened 7 months ago

Keavon commented 7 months ago

This popover menu is currently "coming soon".

image

We'd like to have a checkbox (off by default) called "To Artboard" which makes the alignment of all selected layers work in relation to the artboard rather than their collective bounding box.

There has also been a request for letting the user choose a specific layer's bounding box to align all other layers to (meaning that chosen layer doesn't move, but the others do).

Potentially one more feature that would be handy is a way to choose between "deep" and "shallow" treatment of nested layers, where only the selected folders get aligned vs. each of their contents get aligned.

nico-mayora commented 7 months ago

I can take this on. The checkbox UI element won't require any frontend coding, right?

0HyperCube commented 7 months ago

No javascript required, the widgets are defined in select_tool.rs:174 @nico-mayora. An example of a checkbox in a popover widget is the snapping options defined in document_message_handler.rs:1147.

nico-mayora commented 7 months ago

I think my PR is ready for review if anyone would give it a look :^) https://github.com/GraphiteEditor/Graphite/pull/1724