diff --git a/common/src/app/common/geom/shapes/transforms.cljc b/common/src/app/common/geom/shapes/transforms.cljc index d7f51ff64a..2399c1a7c7 100644 --- a/common/src/app/common/geom/shapes/transforms.cljc +++ b/common/src/app/common/geom/shapes/transforms.cljc @@ -101,9 +101,14 @@ (defn absolute-move "Move the shape to the exactly specified position." - [shape {:keys [x y]}] - (let [dx (- (d/check-num x) (-> shape :selrect :x)) - dy (- (d/check-num y) (-> shape :selrect :y))] + [shape pos] + (let [x (dm/get-prop pos :x) + y (dm/get-prop pos :y) + sr (dm/get-prop shape selrect) + px (dm/get-prop sr :x) + py (dm/get-prop sr :y) + dx (- (d/check-num x) px) + dy (- (d/check-num y) py)] (move shape (gpt/point dx dy)))) ; ---- Geometric operations