M5: the frame_with_child doc comment gives the layers' real positions (#2377 review)

The nested frame is 100 x 100 at (180, 180) and its rectangle is 40 x 40 at (200, 200), as the code creates them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 driver, no subagent
This commit is contained in:
Trevor BrownandClaude Opus 5.5 authored and bflatastic committed 2026-11-19 00:21:12 +07:00
1 parent 4806b95e8e
commit 944fe8616c
1 file changed
+2 -2
@@ -563,8 +563,8 @@ fn shift_click_takes_a_layer_out_where_nothing_can_move() {
assert_eq!(s.selection(), vec![k.empty], "Shift-click still takes the layer out");
}
/// A top-level 300 x 300 frame with a filled 100 x 100 rectangle at (50, 50) and a nested frame
/// at (200, 200 80x80) holding a rectangle at (210, 210 40x40).
/// A top-level 300 x 300 frame with a filled 100 x 100 rectangle at (50, 50) and a nested 100 x 100
/// frame at (180, 180) holding a 40 x 40 rectangle at (200, 200).
fn frame_with_child(s: &mut Session) -> (NodeId, NodeId, NodeId, NodeId) {
let f = id(&ex(s, "frame.create", json!({"x": 0, "y": 0, "width": 300, "height": 300})));
let c = id(&ex(s, "shape.rectangle", json!({"x": 50, "y": 50, "width": 100, "height": 100, "parent": f})));