0
Fork 0
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:
Andrey Antukh 2020-04-30 13:52:46 +02:00 committed by Alonso Torres
parent d3fe0a8abd
commit 6cffaafe24
2 changed files with 6 additions and 2 deletions

View file

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

View file

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