diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-11-18 00:58:32 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-11-18 00:58:32 +0100 |
| commit | b2e6a297893348a871fba8997017a9fc98d5674b (patch) | |
| tree | c88f18c063d97d91712185c58ccf1cd745663cc1 /src/library/align.rs | |
| parent | d9c529347d7f46eb2f4698d256b1906c1ced6b76 (diff) | |
Refactoring
Diffstat (limited to 'src/library/align.rs')
| -rw-r--r-- | src/library/align.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/library/align.rs b/src/library/align.rs index 19c52f98..5aeef543 100644 --- a/src/library/align.rs +++ b/src/library/align.rs @@ -49,7 +49,6 @@ impl Layout for AlignNode { pod.expand.y &= self.aligns.y.is_none(); let mut frames = self.child.layout(ctx, &pod); - for (Constrained { item: frame, cts }, (current, _)) in frames.iter_mut().zip(regions.iter()) { @@ -67,10 +66,7 @@ impl Layout for AlignNode { let frame = Rc::make_mut(frame); frame.size = canvas; frame.baseline += offset.y; - - for (point, _) in &mut frame.elements { - *point += offset; - } + frame.translate(offset); cts.expand = regions.expand; cts.exact = current.to_spec().map(Some); |
