diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs index 4014d1dbd..47aac34fb 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs @@ -27,21 +27,21 @@ color-id (:fill-color-ref-id fill) shared-libs-colors (dm/get-in shared-libs [color-file-id :data :colors]) is-shared? (contains? shared-libs-colors color-id) + has-color? (or (not (nil? (:fill-color fill))) (not (nil? (:fill-color-gradient fill)))) attrs (if (or is-shared? (= color-file-id file-id)) (d/without-nils {:color (str/lower (:fill-color fill)) :opacity (:fill-opacity fill) :id color-id :file-id color-file-id - :gradient (:fill-color-gradient fill) - :image (:fill-image fill)}) + :gradient (:fill-color-gradient fill)}) (d/without-nils {:color (str/lower (:fill-color fill)) :opacity (:fill-opacity fill) - :gradient (:fill-color-gradient fill) - :image (:fill-image fill)}))] - {:attrs attrs - :prop :fill - :shape-id (:shape-id fill) - :index (:index fill)})) + :gradient (:fill-color-gradient fill)}))] + (when has-color? + {:attrs attrs + :prop :fill + :shape-id (:shape-id fill) + :index (:index fill)}))) (defn stroke->color-att [stroke file-id shared-libs] @@ -49,18 +49,16 @@ color-id (:stroke-color-ref-id stroke) shared-libs-colors (dm/get-in shared-libs [color-file-id :data :colors]) is-shared? (contains? shared-libs-colors color-id) - has-color? (or (not (nil? (:stroke-color stroke))) (not (nil? (:stroke-image stroke))) ) + has-color? (or (not (nil? (:stroke-color stroke))) (not (nil? (:stroke-color-gradient stroke)))) attrs (if (or is-shared? (= color-file-id file-id)) (d/without-nils {:color (str/lower (:stroke-color stroke)) :opacity (:stroke-opacity stroke) :id color-id :file-id color-file-id - :gradient (:stroke-color-gradient stroke) - :image (:stroke-image stroke)}) + :gradient (:stroke-color-gradient stroke)}) (d/without-nils {:color (str/lower (:stroke-color stroke)) :opacity (:stroke-opacity stroke) - :gradient (:stroke-color-gradient stroke) - :image (:stroke-image stroke)}))] + :gradient (:stroke-color-gradient stroke)}))] (when has-color? {:attrs attrs :prop :stroke