mirror of
https://github.com/penpot/penpot.git
synced 2025-03-14 08:41:48 -05:00
🐛 Fix error on path editing
This commit is contained in:
parent
7d48b86e46
commit
2da421bb7a
2 changed files with 11 additions and 6 deletions
|
@ -298,7 +298,10 @@
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state stream]
|
(watch [_ state stream]
|
||||||
(let [mode (get-in state [:workspace-local :edit-path id :edit-mode])
|
(let [mode (get-in state [:workspace-local :edit-path id :edit-mode])
|
||||||
stopper (->> stream (rx/filter (ptk/type? ::start-path-edit)))
|
stopper (->> stream
|
||||||
|
(rx/filter #(or
|
||||||
|
(= (ptk/type %) ::dwe/clear-edition-mode)
|
||||||
|
(= (ptk/type %) ::start-path-edit))))
|
||||||
interrupt (->> stream (rx/filter #(= % :interrupt)) (rx/take 1))]
|
interrupt (->> stream (rx/filter #(= % :interrupt)) (rx/take 1))]
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (undo/start-path-undo))
|
(rx/of (undo/start-path-undo))
|
||||||
|
|
|
@ -82,11 +82,13 @@
|
||||||
[ids]
|
[ids]
|
||||||
(ptk/reify ::update-layout-positions
|
(ptk/reify ::update-layout-positions
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ _]
|
(watch [_ state _]
|
||||||
(if (d/not-empty? ids)
|
(let [objects (wsh/lookup-page-objects state)
|
||||||
(let [modif-tree (dwm/create-modif-tree ids (ctm/reflow-modifiers))]
|
ids (->> ids (filter #(contains? objects %)))]
|
||||||
(rx/of (dwm/apply-modifiers {:modifiers modif-tree})))
|
(if (d/not-empty? ids)
|
||||||
(rx/empty)))))
|
(let [modif-tree (dwm/create-modif-tree ids (ctm/reflow-modifiers))]
|
||||||
|
(rx/of (dwm/apply-modifiers {:modifiers modif-tree})))
|
||||||
|
(rx/empty))))))
|
||||||
|
|
||||||
(defn initialize
|
(defn initialize
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Add table
Reference in a new issue