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 d19a39250..04a73f936 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 @@ -54,7 +54,7 @@ has-fills? (or (= :multiple fills) (some? (seq fills))) - state* (mf/use-state true) + state* (mf/use-state has-fills?) open? (deref state*) toggle-content (mf/use-fn #(swap! state* not)) @@ -94,7 +94,7 @@ (st/emit! (dc/remove-fill ids {:color default-color :opacity 1} index)) (when (or (= :multiple fills) - (= 1 (count (seq fills)))) + (= 0 (count (seq fills)))) (close-content)))) on-remove-all @@ -149,7 +149,7 @@ :data-testid "add-fill" :on-click on-add} i/add])]] - (when (and open? has-fills?) + (when open? [:div {:class (stl/css :element-content)} (cond (= :multiple fills) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs index 9f7969f2c..a9fbb4f4b 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/stroke.cljs @@ -97,14 +97,11 @@ (when-not (str/empty? value) (st/emit! (dc/change-stroke ids {:stroke-alignment value} index)))) - - on-stroke-width-change (fn [index value] (when-not (str/empty? value) (st/emit! (dc/change-stroke ids {:stroke-width value} index)))) - open-caps-select (fn [caps-state] (fn [event]