0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-25 08:16:49 -05:00

Merge pull request #3553 from penpot/niwinz-bugfixes-2

🐛 Set proper minimal shape size on draw on click operation
This commit is contained in:
Pablo Alba 2023-08-23 12:47:18 +02:00 committed by GitHub
commit a6ec73fd4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)))))