pub fn start_snap(&mut self, document_message_handler: &DocumentMessageHandler, bounding_boxes: impl Iterator<Item = [DVec2; 2]>, snap_x: bool, snap_y: bool) {
		if document_message_handler.snapping_enabled {
			self.snap_x = snap_x;
			self.snap_y = snap_y;

			// Could be made into sorted Vec or a HashSet for more performant lookups.
			self.bound_targets = Some(bounding_boxes.flat_map(expand_bounds).collect());
			self.point_targets = None;
		}
	}
/// Gets a list of snap targets for the X and Y axes (if specified) in Viewport coords for the target layers (usually all layers or all non-selected layers.)
/// This should be called at the start of a drag.
Gets a list of snap targets for the X and Y axes (if specified) in Viewport coords for the target layers (usually all layers or all non-selected layers.)
This should be called at the start of a drag.
Gets a list of snap targets for the X and Y axes ( if specified ) in Viewport coords for the target layers ( usually all layers or all non - selected layers . ) This should be called at the start of a drag .
pub fn start_snap(&mut self, document_message_handler: &DocumentMessageHandler, bounding_boxes: impl Iterator<Item = [DVec2; 2]>, snap_x: bool, snap_y: bool) {
		if document_message_handler.snapping_enabled {
			self.snap_x = snap_x;
			self.snap_y = snap_y;
			// Could be made into sorted Vec or a HashSet for more performant lookups.
			self.bound_targets = Some(bounding_boxes.flat_map(expand_bounds).collect());
			self.point_targets = None;
		}
	}
pub fn start_snap ( & mut self , document_message_handler : & DocumentMessageHandler , bounding_boxes : impl Iterator < Item = [ DVec2 ; 2 ] > , snap_x : bool , snap_y : bool ) { if document_message_handler . snapping_enabled { self . snap_x = snap_x ; self . snap_y = snap_y ; // Could be made into sorted Vec or a HashSet for more performant lookups. self . bound_targets = Some ( bounding_boxes . flat_map ( expand_bounds ) . collect ( ) ) ; self . point_targets = None ; } }
Gets a list of snap targets for the X and Y axes (if specified) in Viewport coords for the target layers (usually all layers or all non-selected layers.)
Gets a list of snap targets for the X and Y axes ( if specified ) in Viewport coords for the target layers ( usually all layers or all non - selected layers . )
&mut self
document_message_handler
&DocumentMessageHandler
bounding_boxes
impl Iterator<Item = [DVec2; 2]>
snap_x
bool
snap_y
bool
&mut self
document_message_handler
&DocumentMessageHandler
bounding_boxes
impl Iterator<Item = [DVec2; 2]>
snap_x
bool
snap_y
bool