mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 00:16:10 +02: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)]
|
objects (dwc/lookup-page-objects state page-id)]
|
||||||
(rx/of (dwc/expand-all-parents [id] objects)))))))
|
(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
|
(defn shift-select-shapes
|
||||||
([id]
|
([id]
|
||||||
(ptk/reify ::shift-select-shapes
|
(ptk/reify ::shift-select-shapes
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
[app.main.data.workspace :as dw]
|
[app.main.data.workspace :as dw]
|
||||||
[app.main.data.workspace.common :as dwc]
|
[app.main.data.workspace.common :as dwc]
|
||||||
[app.main.data.workspace.texts :as dwt]
|
[app.main.data.workspace.texts :as dwt]
|
||||||
|
[app.main.data.workspace.selection :as dws]
|
||||||
[app.main.ui.cursors :as cur]
|
[app.main.ui.cursors :as cur]
|
||||||
[app.main.ui.shapes.text.styles :as sts])
|
[app.main.ui.shapes.text.styles :as sts])
|
||||||
(:import
|
(:import
|
||||||
|
@ -163,7 +164,8 @@
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! dw/clear-edition-mode)
|
(st/emit! dw/clear-edition-mode)
|
||||||
(when (= 0 (content-size @content-var))
|
(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
|
on-click-outside
|
||||||
(fn [event]
|
(fn [event]
|
||||||
|
@ -202,7 +204,8 @@
|
||||||
|
|
||||||
on-mount
|
on-mount
|
||||||
(fn []
|
(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)]]
|
(events/listen js/document EventType.KEYUP on-key-up)]]
|
||||||
(st/emit! (dwt/assign-editor id editor)
|
(st/emit! (dwt/assign-editor id editor)
|
||||||
(dwc/start-undo-transaction))
|
(dwc/start-undo-transaction))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue