mirror of
https://github.com/penpot/penpot.git
synced 2025-02-26 00:36:12 -05:00
🐛 Set proper minimal shape size on draw on click operation
This commit is contained in:
parent
9618bd6697
commit
c0422f4e13
1 changed files with 6 additions and 1 deletions
|
@ -52,7 +52,12 @@
|
||||||
(assoc :grow-type :fixed)
|
(assoc :grow-type :fixed)
|
||||||
|
|
||||||
(and ^boolean click-draw? (not ^boolean text?))
|
(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)
|
(cts/setup-shape)
|
||||||
(gsh/transform-shape (ctm/move-modifiers (- (/ min-side 2)) (- (/ min-side 2)))))
|
(gsh/transform-shape (ctm/move-modifiers (- (/ min-side 2)) (- (/ min-side 2)))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue