Add a Select tool overlay for the layer origin (#3471)

* Add blue layer origin cross overlay

* Apply suggestion from @Keavon

* Skip layers without local transforms

* Disable the Custom Pivot by default

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
James Lindsay
2026-01-14 09:50:03 +00:00
committed by GitHub
parent 20a595db39
commit c46060db44
11 changed files with 117 additions and 24 deletions

View File

@@ -121,8 +121,8 @@ mod test_centroid {
#[test]
fn centroid_rect() {
let rect = Subpath::<PointId>::new_rectangle(DVec2::new(100., 100.), DVec2::new(300., 200.));
let (centre, area) = rect.area_centroid_and_area(Some(1e-3), Some(1e-3)).unwrap();
let (center, area) = rect.area_centroid_and_area(Some(1e-3), Some(1e-3)).unwrap();
assert_eq!(area, 200. * 100.);
assert_eq!(centre, DVec2::new(200., 150.))
assert_eq!(center, DVec2::new(200., 150.))
}
}