0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-21 04:01:24 -05:00

🐛 Fixes problem with colorpicker libraries

This commit is contained in:
alonso.torres 2020-10-27 13:03:19 +01:00 committed by Hirunatan
parent d01921cd61
commit 4adb79e869
2 changed files with 8 additions and 5 deletions
frontend/src/app/main/ui/workspace

View file

@ -167,11 +167,12 @@
on-select-library-color
(fn [color]
(reset! dirty? true)
(reset! state (data->state color)))
(reset! state (data->state color))
(on-change color))
on-add-library-color
(fn [color] (st/emit! (dwl/add-color (state->data @state))))
(fn [color]
(st/emit! (dwl/add-color (state->data @state))))
on-activate-gradient
(fn [type]

View file

@ -66,8 +66,10 @@
(vals file-colors)
:else ;; Library UUID
(map #(merge {:file-id (uuid @selected-library)})
(vals (get-in shared-libs [(uuid @selected-library) :data :colors]))))]
(->> (get-in shared-libs [(uuid @selected-library) :data :colors])
(vals)
(map #(merge % {:file-id (uuid @selected-library)}))))]
(reset! current-library-colors (into [] (filter check-valid-color?) mapped-colors)))))
;; If the file colors change and the file option is selected updates the state