From 32c0913f0074d7a73f3c9be1db73dbffb280e6bf Mon Sep 17 00:00:00 2001
From: "alonso.torres" <alonso.torres@kaleidos.net>
Date: Thu, 4 Feb 2021 11:44:44 +0100
Subject: [PATCH] :bug: Fixes problem with pixel-level movement

---
 .../src/app/main/data/workspace/transforms.cljs    | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs
index bcb4c636b..519517c04 100644
--- a/frontend/src/app/main/data/workspace/transforms.cljs
+++ b/frontend/src/app/main/data/workspace/transforms.cljs
@@ -378,15 +378,17 @@
               (->> move-events
                    (rx/take-until stopper)
                    (rx/scan #(gpt/add %1 mov-vec) (gpt/point 0 0))
-                   (rx/map #(set-modifiers selected {:displacement (gmt/translate-matrix %)})))
+                   (rx/map gmt/translate-matrix)
+                   (rx/map #(fn [state] (assoc-in state [:workspace-local :modifiers] {:displacement %}))))
               (rx/of (move-selected direction shift?)))
 
-             (rx/of (apply-modifiers selected)
+             (rx/of (set-modifiers selected)
+                    (apply-modifiers selected)
+                    (calculate-frame-for-move selected)
                     (fn [state] (-> state
-                                    (update :workspace-local dissoc :current-move-selected))))
-             (->>
-              (rx/timer 100)
-              (rx/map (fn [] finish-transform)))))
+                                    (update :workspace-local dissoc :modifiers)
+                                    (update :workspace-local dissoc :current-move-selected)))
+                    finish-transform)))
             (rx/empty))))))