mirror of
https://github.com/penpot/penpot.git
synced 2025-04-17 01:12:16 -05:00
🐛 Removes problems with texts
This commit is contained in:
parent
2e7f90f3cc
commit
95ab5b57b7
2 changed files with 13 additions and 2 deletions
|
@ -105,6 +105,14 @@
|
|||
objects (dwc/lookup-page-objects state page-id)]
|
||||
(rx/of (dwc/expand-all-parents [id] objects)))))))
|
||||
|
||||
(defn deselect-shape
|
||||
[id]
|
||||
(us/verify ::us/uuid id)
|
||||
(ptk/reify ::select-shape
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(update-in state [:workspace-local :selected] disj id))))
|
||||
|
||||
(defn shift-select-shapes
|
||||
([id]
|
||||
(ptk/reify ::shift-select-shapes
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
[app.main.data.workspace :as dw]
|
||||
[app.main.data.workspace.common :as dwc]
|
||||
[app.main.data.workspace.texts :as dwt]
|
||||
[app.main.data.workspace.selection :as dws]
|
||||
[app.main.ui.cursors :as cur]
|
||||
[app.main.ui.shapes.text.styles :as sts])
|
||||
(:import
|
||||
|
@ -163,7 +164,8 @@
|
|||
(fn []
|
||||
(st/emit! dw/clear-edition-mode)
|
||||
(when (= 0 (content-size @content-var))
|
||||
(st/emit! (dw/delete-shapes [id]))))
|
||||
(st/emit! (dws/deselect-shape id)
|
||||
(dw/delete-shapes [id]))))
|
||||
|
||||
on-click-outside
|
||||
(fn [event]
|
||||
|
@ -202,7 +204,8 @@
|
|||
|
||||
on-mount
|
||||
(fn []
|
||||
(let [keys [(events/listen js/document EventType.CLICK on-click-outside)
|
||||
(let [keys [(events/listen js/document EventType.MOUSEDOWN on-click-outside)
|
||||
(events/listen js/document EventType.CLICK on-click-outside)
|
||||
(events/listen js/document EventType.KEYUP on-key-up)]]
|
||||
(st/emit! (dwt/assign-editor id editor)
|
||||
(dwc/start-undo-transaction))
|
||||
|
|
Loading…
Add table
Reference in a new issue