♻️ Refactor bool shape creation and modification events

This commit is contained in:
Andrey Antukh 2025-03-28 17:18:12 +01:00
parent b242eb5b32
commit f545d7b3ea
5 changed files with 114 additions and 98 deletions

View file

@ -479,9 +479,12 @@
(let [old-val (get old attr)
new-val (get new attr)]
(not= old-val new-val)))
new-obj (if with-objects?
(update-fn object objects)
(update-fn object))]
new-obj
(if with-objects?
(update-fn object objects)
(update-fn object))]
(when-not (= object new-obj)
(let [attrs (or attrs (d/concat-set (keys object) (keys new-obj)))]
(filter (partial changed? object new-obj) attrs)))))