mirror of
https://github.com/penpot/penpot.git
synced 2026-03-05 17:51:17 +00:00
🐛 Start edition mode on adding text shape.
This commit is contained in:
committed by
Alonso Torres
parent
d3fe0a8abd
commit
6cffaafe24
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user