mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-01 08:16:12 +00:00
Merge feat/ruler-zero-point: the page-origin ruler test sets the page origin
This commit is contained in:
commit
b7efb71c05
1 file changed
+1
@@ -178,6 +178,7 @@ mod tests {
|
||||
s.execute("transform.set", &json!({"ids": [right], "x": r, "ref": 0})).unwrap();
|
||||
}
|
||||
// A page origin restarts the horizontal ruler on each page.
|
||||
s.execute("document.preferences", &json!({"rulerOrigin": "page"})).unwrap();
|
||||
let pieces = s.doc().unwrap().doc.ruler_pieces(SpreadRef::Doc(1));
|
||||
let starts: Vec<f64> = pieces.iter().map(|p| p.2.x).collect();
|
||||
assert_eq!(starts, [0.0, 612.0]);
|
||||
|
||||
Reference in new issue
Block a user