From 5d8982c734fb88ca8d81d0e0ee0be6785fce7d7e Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 14 Jan 2022 12:10:55 +0100 Subject: [PATCH] :bug: Fix transform text --- .../app/main/ui/workspace/viewport/utils.cljs | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/viewport/utils.cljs b/frontend/src/app/main/ui/workspace/viewport/utils.cljs index fe92fa46f4..088d175494 100644 --- a/frontend/src/app/main/ui/workspace/viewport/utils.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/utils.cljs @@ -49,17 +49,26 @@ [width height] (if (or resize-x? resize-y?) - (let [pc (-> (gpt/point x y) - (gpt/transform transform) - (gpt/transform current-transform)) + (let [pc (cond-> (gpt/point x y) + (some? transform) + (gpt/transform transform) - pw (-> (gpt/point (+ x width) y) - (gpt/transform transform) - (gpt/transform current-transform)) + (some? current-transform) + (gpt/transform current-transform)) - ph (-> (gpt/point x (+ y height)) - (gpt/transform transform) - (gpt/transform current-transform))] + pw (cond-> (gpt/point (+ x width) y) + (some? transform) + (gpt/transform transform) + + (some? current-transform) + (gpt/transform current-transform)) + + ph (cond-> (gpt/point x (+ y height)) + (some? transform) + (gpt/transform transform) + + (some? current-transform) + (gpt/transform current-transform))] [(gpt/distance pc pw) (gpt/distance pc ph)]) [width height])]