0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 15:51:37 -05:00

Merge pull request #6061 from penpot/alotor-bug-fills

🐛 Fix problem adding fill
This commit is contained in:
Alejandro 2025-03-12 12:31:43 +01:00 committed by GitHub
commit 88772a9ced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,9 +194,10 @@
(watch [_ state _]
(let [change-fn (fn [shape attrs] (assoc shape :fills [attrs]))
undo-id (js/Symbol)]
(rx/of (dwu/start-undo-transaction undo-id))
(transform-fill state ids color change-fn options)
(rx/of (dwu/commit-undo-transaction undo-id)))))))
(rx/concat
(rx/of (dwu/start-undo-transaction undo-id))
(transform-fill state ids color change-fn options)
(rx/of (dwu/commit-undo-transaction undo-id))))))))
(defn add-fill
([ids color] (add-fill ids color nil))
@ -220,9 +221,10 @@
undo-id
(js/Symbol)]
(rx/of (dwu/start-undo-transaction undo-id))
(transform-fill state ids color change-fn options)
(rx/of (dwu/commit-undo-transaction undo-id)))))))
(rx/concat
(rx/of (dwu/start-undo-transaction undo-id))
(transform-fill state ids color change-fn options)
(rx/of (dwu/commit-undo-transaction undo-id))))))))
(defn remove-fill
([ids color position] (remove-fill ids color position nil))