[L2Ork-dev] canvas snap-to-grid

Jonathan Wilkes jon.w.wilkes at gmail.com
Thu Oct 29 17:29:46 EDT 2020


Hi all,

Canvas snap-to-grid feature is now available for review:

https://git.purrdata.net/jwilkes/purr-data/-/merge_requests/597

Albert-- can you take a look at my math in canvas_snap_to_grid?

I like the effect of `gsize / 2` for attaching to the closest grid
line, but I only implemented that for the initial adjustment to align
the anchor object.

I notice that once you start moving the selection, it kind of "snaps
backwards" to the "floor" gridline. Is there an easy way to fix it so
it always snaps to the closest gridline for the general case (e.g., in
the assignment to dx/dy below the snap_got_anchor conditional)?

-Jonathan


More information about the L2Ork-dev mailing list