Closed 0HyperCube closed 5 months ago
@0HyperCube would it be alright to convert bounding_box_snapping
and geometry_snapping
to maybe enums in which the various fields of BoundsSnapping
and PointSnapping
are either activated or not. Right now both only have a default implementation.
https://github.com/GraphiteEditor/Graphite/blob/438c45eb802e75e41aad5ce0ab055c006563a334/editor/src/messages/portfolio/document/utility_types/misc.rs#L58-L99
@shyamjayakannan I'm not sure what you mean by a maybe enums. The struct here stores these booleans separately as you can snap to many things at the same time, but if you approach keeps this behaviour then it will be fine.
Would behavior like that in the video below be alright?
https://github.com/GraphiteEditor/Graphite/assets/120047549/8b1cb1da-5310-480f-8823-c8dd5d6f2049
As can be seen in the video, earlier the cursor was snapping to Bounding Box edges, but turning it off removes the snapping behavior.
I have also removed the checkboxes in front of the Bounding boxes and Geometry options that were present earlier because the snapping can be further customized using the Popover
button
That looks great. My only comment is that we don't want recursive popover menus, so please include all those checkboxes in the same menu under the two labeled categories.
@Keavon will do. Should I make a separate PR or add commits to #1727?
Separate PRs for separate topics.
Currently the user can only choose to toggle snapping to bounding boxes and snapping to geometry.
This should be expanded to allow users to for example ignore snapping to bounding box centres but still snap to corners. State to enable more fine grained snapping is already implemented as part of the
BoundsSnapping
andNodeSnapping
structs. The"Snap customization settings"
popup is declared indocument_message_handler.rs
and the snapping state is stored inmisc.rs
.