From c0422f4e13358e947e0e6b8fc3ceb062760b6b63 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 23 Aug 2023 12:43:28 +0200 Subject: [PATCH] :bug: Set proper minimal shape size on draw on click operation --- frontend/src/app/main/data/workspace/drawing/common.cljs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/drawing/common.cljs b/frontend/src/app/main/data/workspace/drawing/common.cljs index 5ac762080..4b3c6f952 100644 --- a/frontend/src/app/main/data/workspace/drawing/common.cljs +++ b/frontend/src/app/main/data/workspace/drawing/common.cljs @@ -52,7 +52,12 @@ (assoc :grow-type :fixed) (and ^boolean click-draw? (not ^boolean text?)) - (-> (assoc :width min-side :height min-side) + (-> (assoc :width min-side) + (assoc :height min-side) + ;; NOTE: we need to recalculate the selrect and + ;; points, so we assign `nil` to it + (assoc :selrect nil) + (assoc :points nil) (cts/setup-shape) (gsh/transform-shape (ctm/move-modifiers (- (/ min-side 2)) (- (/ min-side 2)))))