Skip to content

Commit 2ff11dd

Browse files
committed
Fix insidenss logic
1 parent fdebdec commit 2ff11dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

node-graph/libraries/vector-types/src/vector/click_target.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ impl ClickTarget {
300300
return true;
301301
}
302302

303-
// Build closed selection path, then check if any subpath is entirely within it
303+
// Build closed selection path, then check if all contours are entirely within it
304304
let mut selection = BezPath::from_path_segments(bezier_iter());
305305
selection.close_path();
306-
subpaths.iter().any(|subpath| bezpath_is_inside_bezpath(&subpath.to_bezpath(), &selection, None, None))
306+
subpaths.iter().all(|subpath| bezpath_is_inside_bezpath(&subpath.to_bezpath(), &selection, None, None))
307307
}
308308
ClickTargetType::FreePoint(point) => bezier_iter().map(|bezier: PathSeg| bezier.winding(dvec2_to_point(point.position))).sum::<i32>() != 0,
309309
}

0 commit comments

Comments
 (0)