mirror of
https://github.com/penpot/penpot.git
synced 2025-03-20 19:51:23 -05:00
🐛 Fixes problem with colorpicker libraries
This commit is contained in:
parent
d01921cd61
commit
4adb79e869
2 changed files with 8 additions and 5 deletions
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue