diff --git a/common/src/app/common/geom/shapes.cljc b/common/src/app/common/geom/shapes.cljc index 7b068d7e95..af4f491940 100644 --- a/common/src/app/common/geom/shapes.cljc +++ b/common/src/app/common/geom/shapes.cljc @@ -22,14 +22,16 @@ ;; --- Outer Rect - (defn translate-to-frame - [shape {:keys [x y]}] - (gtr/move shape (gpt/negate (gpt/point x y))) ) + [shape frame] + (->> (gpt/point (- (dm/get-prop frame :x)) + (- (dm/get-prop frame :y))) + (gtr/move shape))) (defn translate-from-frame - [shape {:keys [x y]}] - (gtr/move shape (gpt/point x y)) ) + [shape frame] + (gtr/move shape (gpt/point (dm/get-prop frame :x) + (dm/get-prop frame :y)))) (defn shape->rect [shape]