From fa19ce2b5b90298fa639718949a9c498ce08326f Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 14 Feb 2024 07:58:21 +0100 Subject: [PATCH] :bug: Fix change stroke color from library doesn't work --- frontend/src/app/main/data/workspace/colors.cljs | 4 ++-- frontend/src/app/main/ui/workspace/colorpicker.cljs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/data/workspace/colors.cljs b/frontend/src/app/main/data/workspace/colors.cljs index 1d4afbd9b..7c31ef43b 100644 --- a/frontend/src/app/main/data/workspace/colors.cljs +++ b/frontend/src/app/main/data/workspace/colors.cljs @@ -442,6 +442,7 @@ (declare activate-colorpicker-color) (declare activate-colorpicker-gradient) (declare activate-colorpicker-image) +(declare update-colorpicker) (defn apply-color-from-colorpicker [color] @@ -453,8 +454,7 @@ (:image color) (activate-colorpicker-image) (:color color) (activate-colorpicker-color) (= :linear (get-in color [:gradient :type])) (activate-colorpicker-gradient :linear-gradient) - (= :radial (get-in color [:gradient :type])) (activate-colorpicker-gradient :radial-gradient)) - (apply-color-from-palette color false))))) + (= :radial (get-in color [:gradient :type])) (activate-colorpicker-gradient :radial-gradient)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/frontend/src/app/main/ui/workspace/colorpicker.cljs b/frontend/src/app/main/ui/workspace/colorpicker.cljs index c98caaa6c..e74f83525 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker.cljs @@ -145,7 +145,8 @@ on-select-library-color (mf/use-fn (fn [_ color] - (st/emit! (dc/apply-color-from-colorpicker color)))) + (st/emit! (dc/apply-color-from-colorpicker color)) + (on-change color))) on-add-library-color (mf/use-fn