From 91a2155cdd759ed68def8d75bc6fc1389c4f9c9c Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 12 Oct 2026 12:32:01 +0000 Subject: [PATCH] Integration: a selected graphic's Transform x/y are measured from the rulers' zero point #550 places a selected graphic at x/y from its page's left edge; next measures transform.set x/y from the rulers' zero point (view.zeroPoint, ruler origin), and the Transform fields show a graphic's bounds from that point. transform_content now targets x/y from the same origin as the frame path, so a typed value lands where the fields say it is. --- crates/engine/src/cmd/object.rs | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/cmd/object.rs b/crates/engine/src/cmd/object.rs index 2d7be8d44..34ebd72ed 100644 --- a/crates/engine/src/cmd/object.rs +++ b/crates/engine/src/cmd/object.rs @@ -1471,9 +1471,9 @@ fn transform_content(s: &mut Session, p: &Value, ids: &[ItemId]) -> Result 0.0 && o.y > 0.0, "the zero point moved: {o:?}"); + assert!((b.x0 - o.x - 10.0).abs() < 1e-6 && (b.y0 - o.y - 20.0).abs() < 1e-6, "{b:?} from {o:?}"); + // The frame stays. + assert!((it.bounds().x0 - 100.0).abs() < 1e-6, "{:?}", it.bounds()); + } + #[test] fn a_locked_frame_records_no_undo_step() { let (mut s, f) = rotated_frame_with_image();