mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Improve the distribution part of the snapping system (#2626)
* fix distribution snapper visualization going far from layers * fix bugs * Remove traces * remove comment * Fix tests * Rename distribution snapper variables from x, y to horizontal, vertical * Fix tests * Fix bug where center point and corner point have to be enabled for distribution_snapper to work * Cleanup --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -67,7 +67,7 @@ impl Rect {
|
||||
Self::from_box([self[0] - delta, self[1] + delta])
|
||||
}
|
||||
|
||||
/// Expand a rect by a certain amount on top/bottom and on left/right
|
||||
/// Checks if two rects intersect
|
||||
#[must_use]
|
||||
pub fn intersects(&self, other: Self) -> bool {
|
||||
let [mina, maxa] = [self[0].min(self[1]), self[0].max(self[1])];
|
||||
|
||||
Reference in New Issue
Block a user