Snapping improvements (#1567)

This commit is contained in:
0HyperCube
2024-01-13 08:10:24 -08:00
committed by GitHub
parent 456ca170a4
commit bf0ec2c9c8
5 changed files with 34 additions and 6 deletions
@@ -77,7 +77,7 @@ impl Default for SnappingState {
edges: true,
corners: true,
edge_midpoints: false,
centres: false,
centres: true,
},
nodes: NodeSnapping {
paths: true,
@@ -245,6 +245,9 @@ impl SnapSource {
pub fn is_some(&self) -> bool {
self != &Self::None
}
pub fn bounding_box(&self) -> bool {
matches!(self, Self::BoundingBox(_) | Self::Board(_))
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BoundingBoxSnapTarget {