From 8a6f1d82e56d85c4c95c44af8abcfefb71a61119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 22 Nov 2022 15:38:04 +0100 Subject: [PATCH] :bug: Fix min size when creating shapes --- .../src/app/main/data/workspace/drawing/common.cljs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/workspace/drawing/common.cljs b/frontend/src/app/main/data/workspace/drawing/common.cljs index ad0da2563..7c5847624 100644 --- a/frontend/src/app/main/data/workspace/drawing/common.cljs +++ b/frontend/src/app/main/data/workspace/drawing/common.cljs @@ -48,19 +48,19 @@ (cond-> shape (not click-draw?) (-> (assoc :grow-type :fixed)) - + (and click-draw? (not text?)) (-> (assoc :width min-side :height min-side) + (cts/setup-rect-selrect) (gsh/transform-shape (ctm/move-modifiers (- (/ min-side 2)) (- (/ min-side 2))))) (and click-draw? text?) - (assoc :height 17 :width 4 :grow-type :auto-width) - - click-draw? - (cts/setup-rect-selrect) + (-> (assoc :height 17 :width 4 :grow-type :auto-width) + (cts/setup-rect-selrect)) :always (dissoc :initialized? :click-draw?))] + ;; Add & select the created shape to the workspace (rx/concat (if (= :text (:type shape))