mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 21:09:00 -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))
|
(recur (inc counter))
|
||||||
candidate)))))
|
candidate)))))
|
||||||
|
|
||||||
|
(declare start-edition-mode)
|
||||||
|
|
||||||
(defn add-shape
|
(defn add-shape
|
||||||
[attrs]
|
[attrs]
|
||||||
(us/verify ::shape-attrs attrs)
|
(us/verify ::shape-attrs attrs)
|
||||||
|
@ -430,7 +432,9 @@
|
||||||
:id id}]
|
:id id}]
|
||||||
|
|
||||||
(rx/of (dwc/commit-changes [rchange] [uchange] {:commit-local? true})
|
(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
|
;; --- Duplicate Shapes
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
|
|
||||||
on-mouse-down
|
on-mouse-down
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
(mf/deps drawing-tool)
|
(mf/deps drawing-tool edition)
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(dom/stop-propagation event)
|
(dom/stop-propagation event)
|
||||||
(let [ctrl? (kbd/ctrl? event)
|
(let [ctrl? (kbd/ctrl? event)
|
||||||
|
|
Loading…
Add table
Reference in a new issue