mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 04:01:41 +02: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))
|
(filter #(= (:type %) :add-obj))
|
||||||
(map :obj))]
|
(map :obj))]
|
||||||
(doseq [shape added]
|
(doseq [shape added]
|
||||||
(api/set-object [] shape))))
|
(api/process-object shape))))
|
||||||
|
|
||||||
(if (and save-undo? (seq undo-changes))
|
(if (and save-undo? (seq undo-changes))
|
||||||
(let [entry {:undo-changes undo-changes
|
(let [entry {:undo-changes undo-changes
|
||||||
|
|
|
@ -756,6 +756,17 @@
|
||||||
(set-shape-fills fills)
|
(set-shape-fills fills)
|
||||||
(set-shape-strokes strokes)))))
|
(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
|
(defn set-objects
|
||||||
[objects]
|
[objects]
|
||||||
(let [shapes (into [] (vals objects))
|
(let [shapes (into [] (vals objects))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue