diff --git a/frontend/resources/styles/main/partials/sidebar-layers.scss b/frontend/resources/styles/main/partials/sidebar-layers.scss index ea8e23fd4..05c5db65d 100644 --- a/frontend/resources/styles/main/partials/sidebar-layers.scss +++ b/frontend/resources/styles/main/partials/sidebar-layers.scss @@ -64,6 +64,7 @@ } &.selected { + background-color: $colro-gray-60; svg { fill: $color-primary; diff --git a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs index 41c928852..d3870a909 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs @@ -185,6 +185,12 @@ :index index :name (:name item)})] + (mf/use-effect + (mf/deps selected?) + (fn [] + (when selected? + (.scrollIntoView (mf/ref-val dref) false)))) + [:li {:on-context-menu on-context-menu :ref dref :class (dom/classnames