mirror of
https://github.com/penpot/penpot.git
synced 2025-04-17 01:12:16 -05:00
🐛 Fix render object with pending status (#6215)
This commit is contained in:
parent
387c5e67f3
commit
c332528185
2 changed files with 12 additions and 1 deletions
|
@ -405,7 +405,7 @@
|
|||
(filter #(= (:type %) :add-obj))
|
||||
(map :obj))]
|
||||
(doseq [shape added]
|
||||
(api/set-object [] shape))))
|
||||
(api/process-object shape))))
|
||||
|
||||
(if (and save-undo? (seq undo-changes))
|
||||
(let [entry {:undo-changes undo-changes
|
||||
|
|
|
@ -756,6 +756,17 @@
|
|||
(set-shape-fills fills)
|
||||
(set-shape-strokes strokes)))))
|
||||
|
||||
(defn process-object
|
||||
[shape]
|
||||
(let [pending (set-object [] shape)]
|
||||
(when-let [pending (seq pending)]
|
||||
(->> (rx/from pending)
|
||||
(rx/mapcat identity)
|
||||
(rx/reduce conj [])
|
||||
(rx/subs! (fn [_]
|
||||
(clear-drawing-cache)
|
||||
(request-render "set-objects")))))))
|
||||
|
||||
(defn set-objects
|
||||
[objects]
|
||||
(let [shapes (into [] (vals objects))
|
||||
|
|
Loading…
Add table
Reference in a new issue