From 99d7b7ebf8d7d0f44ae653f5f14472541612becb Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 16 Jan 2025 17:58:04 +0100 Subject: [PATCH] :recycle: Use correct function for color transformation Regression introduced in previous refactor PR --- common/src/app/common/types/color.cljc | 11 ----------- .../main/ui/workspace/sidebar/options/menus/fill.cljs | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/common/src/app/common/types/color.cljc b/common/src/app/common/types/color.cljc index 3f309096b7..ab50f4be04 100644 --- a/common/src/app/common/types/color.cljc +++ b/common/src/app/common/types/color.cljc @@ -143,7 +143,6 @@ ;; --- fill -;; FIXME: revisit, this generates invalid colors (defn fill->shape-color [fill] (d/without-nils @@ -154,16 +153,6 @@ :ref-id (:fill-color-ref-id fill) :ref-file (:fill-color-ref-file fill)})) -(defn fill->color - [fill] - (d/without-nils - {:color (:fill-color fill) - :opacity (:fill-opacity fill) - :gradient (:fill-color-gradient fill) - :image (:fill-image fill) - :id (:fill-color-ref-id fill) - :file-id (:fill-color-ref-file fill)})) - (defn set-fill-color [shape position color opacity gradient image] (update-in shape [:fills position] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs index f4c3971ec1..047d263460 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/fill.cljs @@ -168,7 +168,7 @@ (seq fills) [:& h/sortable-container {} (for [[index value] (d/enumerate (:fills values []))] - [:& color-row {:color (ctc/fill->color value) + [:& color-row {:color (ctc/fill->shape-color value) :key index :index index :title (tr "workspace.options.fill")