mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
🐛 Fix min size when creating shapes
This commit is contained in:
parent
87ebb2e24c
commit
8a6f1d82e5
1 changed files with 5 additions and 5 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue