pub fn check_selected_edges(&self, cursor: DVec2) -> Option<(bool, bool, bool, bool)> {
		let cursor = self.transform.inverse().transform_point2(cursor);
		let select_threshold = self.transform.inverse().transform_vector2(DVec2::new(0., BOUNDS_SELECT_THRESHOLD)).length();

		let min = self.bounds[0].min(self.bounds[1]);
		let max = self.bounds[0].max(self.bounds[1]);
		if min.x - cursor.x < select_threshold && min.y - cursor.y < select_threshold && cursor.x - max.x < select_threshold && cursor.y - max.y < select_threshold {
			let mut top = (cursor.y - min.y).abs() < select_threshold;
			let mut bottom = (max.y - cursor.y).abs() < select_threshold;
			let mut left = (cursor.x - min.x).abs() < select_threshold;
			let mut right = (max.x - cursor.x).abs() < select_threshold;
			if cursor.y - min.y + max.y - cursor.y < select_threshold * 2. && (left || right) {
				top = false;
				bottom = false;
			}
			if cursor.x - min.x + max.x - cursor.x < select_threshold * 2. && (top || bottom) {
				left = false;
				right = false;
			}

			if top || bottom || left || right {
				return Some((top, bottom, left, right));
			}
		}

		None
	}
/// Check if the user has selected the edge for dragging (returns which edge in order top, bottom, left, right)
Check if the user has selected the edge for dragging (returns which edge in order top, bottom, left, right)
Check if the user has selected the edge for dragging ( returns which edge in order top bottom left right )
pub fn check_selected_edges(&self, cursor: DVec2) -> Option<(bool, bool, bool, bool)> {
		let cursor = self.transform.inverse().transform_point2(cursor);
		let select_threshold = self.transform.inverse().transform_vector2(DVec2::new(0., BOUNDS_SELECT_THRESHOLD)).length();
		let min = self.bounds[0].min(self.bounds[1]);
		let max = self.bounds[0].max(self.bounds[1]);
		if min.x - cursor.x < select_threshold && min.y - cursor.y < select_threshold && cursor.x - max.x < select_threshold && cursor.y - max.y < select_threshold {
			let mut top = (cursor.y - min.y).abs() < select_threshold;
			let mut bottom = (max.y - cursor.y).abs() < select_threshold;
			let mut left = (cursor.x - min.x).abs() < select_threshold;
			let mut right = (max.x - cursor.x).abs() < select_threshold;
			if cursor.y - min.y + max.y - cursor.y < select_threshold * 2. && (left || right) {
				top = false;
				bottom = false;
			}
			if cursor.x - min.x + max.x - cursor.x < select_threshold * 2. && (top || bottom) {
				left = false;
				right = false;
			}
			if top || bottom || left || right {
				return Some((top, bottom, left, right));
			}
		}
		None
	}
pub fn check_selected_edges ( & self , cursor : DVec2 ) -> Option < ( bool , bool , bool , bool ) > { let cursor = self . transform . inverse ( ) . transform_point2 ( cursor ) ; let select_threshold = self . transform . inverse ( ) . transform_vector2 ( DVec2 :: new ( 0. , BOUNDS_SELECT_THRESHOLD ) ) . length ( ) ; let min = self . bounds [ 0 ] . min ( self . bounds [ 1 ] ) ; let max = self . bounds [ 0 ] . max ( self . bounds [ 1 ] ) ; if min . x - cursor . x < select_threshold && min . y - cursor . y < select_threshold && cursor . x - max . x < select_threshold && cursor . y - max . y < select_threshold { let mut top = ( cursor . y - min . y ) . abs ( ) < select_threshold ; let mut bottom = ( max . y - cursor . y ) . abs ( ) < select_threshold ; let mut left = ( cursor . x - min . x ) . abs ( ) < select_threshold ; let mut right = ( max . x - cursor . x ) . abs ( ) < select_threshold ; if cursor . y - min . y + max . y - cursor . y < select_threshold * 2. && ( left || right ) { top = false ; bottom = false ; } if cursor . x - min . x + max . x - cursor . x < select_threshold * 2. && ( top || bottom ) { left = false ; right = false ; } if top || bottom || left || right { return Some ( ( top , bottom , left , right ) ) ; } } None }
Check if the user has selected the edge for dragging (returns which edge in order top, bottom, left, right)
Check if the user has selected the edge for dragging ( returns which edge in order top bottom left right )
&self
cursor
DVec2
&self
cursor
DVec2