🐛 Fix detach stroke color

This commit is contained in:
Andrés Moya 2021-10-26 14:44:29 +02:00
parent 16db31c53c
commit 6d96dd3818
2 changed files with 5 additions and 1 deletions

View file

@ -102,7 +102,10 @@
(mf/use-callback
(mf/deps ids)
(fn []
(st/emit! (dc/change-stroke ids (dissoc current-stroke-color :id :file-id)))))
(let [remove-multiple (fn [[_ value]] (not= value :multiple))
current-stroke-color (-> (into {} (filter remove-multiple) current-stroke-color)
(assoc :id nil :file-id nil))]
(st/emit! (dc/change-stroke ids current-stroke-color)))))
on-stroke-style-change
(fn [event]