mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05:00
🐛 Start edition mode on adding text shape.
This commit is contained in:
parent
d3fe0a8abd
commit
6cffaafe24
2 changed files with 6 additions and 2 deletions
|
@ -394,6 +394,8 @@
|
|||
(recur (inc counter))
|
||||
candidate)))))
|
||||
|
||||
(declare start-edition-mode)
|
||||
|
||||
(defn add-shape
|
||||
[attrs]
|
||||
(us/verify ::shape-attrs attrs)
|
||||
|
@ -430,7 +432,9 @@
|
|||
:id id}]
|
||||
|
||||
(rx/of (dwc/commit-changes [rchange] [uchange] {:commit-local? true})
|
||||
(select-shapes #{id}))))))
|
||||
(select-shapes #{id})
|
||||
(when (= :text (:type attrs))
|
||||
(start-edition-mode id)))))))
|
||||
|
||||
|
||||
;; --- Duplicate Shapes
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
|
||||
on-mouse-down
|
||||
(mf/use-callback
|
||||
(mf/deps drawing-tool)
|
||||
(mf/deps drawing-tool edition)
|
||||
(fn [event]
|
||||
(dom/stop-propagation event)
|
||||
(let [ctrl? (kbd/ctrl? event)
|
||||
|
|
Loading…
Add table
Reference in a new issue