summaryrefslogtreecommitdiff
path: root/src/library/transform.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-11-18 00:58:32 +0100
committerLaurenz <laurmaedje@gmail.com>2021-11-18 00:58:32 +0100
commitb2e6a297893348a871fba8997017a9fc98d5674b (patch)
treec88f18c063d97d91712185c58ccf1cd745663cc1 /src/library/transform.rs
parentd9c529347d7f46eb2f4698d256b1906c1ced6b76 (diff)
Refactoring
Diffstat (limited to 'src/library/transform.rs')
-rw-r--r--src/library/transform.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/library/transform.rs b/src/library/transform.rs
index ef9caf2e..10752358 100644
--- a/src/library/transform.rs
+++ b/src/library/transform.rs
@@ -30,14 +30,10 @@ impl Layout for MoveNode {
for (Constrained { item: frame, .. }, (_, base)) in
frames.iter_mut().zip(regions.iter())
{
- let offset = Point::new(
+ Rc::make_mut(frame).translate(Point::new(
self.offset.x.map(|x| x.resolve(base.w)).unwrap_or_default(),
self.offset.y.map(|y| y.resolve(base.h)).unwrap_or_default(),
- );
-
- for (point, _) in &mut Rc::make_mut(frame).elements {
- *point += offset;
- }
+ ));
}
frames