Fix place base
This commit is contained in:
parent
fea238921f
commit
8cbc2ac483
|
|
@ -78,7 +78,7 @@ impl Layout for MoveNode {
|
|||
let mut fragment = self.body.layout(vt, styles, regions)?;
|
||||
for frame in &mut fragment {
|
||||
let delta = self.delta.resolve(styles);
|
||||
let delta = delta.zip(frame.size()).map(|(d, s)| d.relative_to(s));
|
||||
let delta = delta.zip(regions.base).map(|(d, s)| d.relative_to(s));
|
||||
frame.translate(delta.to_point());
|
||||
}
|
||||
Ok(fragment)
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -0,0 +1,7 @@
|
|||
// Test that placement is relative to container and not itself.
|
||||
|
||||
---
|
||||
#set page(height: 80pt, margin: 0pt)
|
||||
#place(right, dx: -70%, dy: 20%, [First])
|
||||
#place(left, dx: 20%, dy: 60%, [Second])
|
||||
#place(center + horizon, dx: 25%, dy: 25%, [Third])
|
||||
Loading…
Reference in New Issue