aboutsummaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/tile.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs
index 16779c10..447a8929 100644
--- a/src/layout/tile.rs
+++ b/src/layout/tile.rs
@@ -247,8 +247,14 @@ impl<W: LayoutElement> Tile<W> {
) {
let current_offset = self.render_offset();
+ // Preserve the previous config if ongoing.
+ let anim = self.move_animation.take().map(|move_| move_.anim);
+ let anim = anim
+ .map(|anim| anim.restarted(1., 0., 0.))
+ .unwrap_or_else(|| Animation::new(1., 0., 0., config));
+
self.move_animation = Some(MoveAnimation {
- anim: Animation::new(1., 0., 0., config),
+ anim,
from: from + current_offset,
});
}