mirror of
https://github.com/penpot/penpot.git
synced 2026-09-06 12:09:24 +00:00
✨ Scroll selected layer into view
This commit is contained in:
parent
6d9155032f
commit
59ae0b0f55
@ -64,6 +64,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
|
background-color: $colro-gray-60;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
fill: $color-primary;
|
fill: $color-primary;
|
||||||
|
|||||||
@ -185,6 +185,12 @@
|
|||||||
:index index
|
:index index
|
||||||
:name (:name item)})]
|
: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
|
[:li {:on-context-menu on-context-menu
|
||||||
:ref dref
|
:ref dref
|
||||||
:class (dom/classnames
|
:class (dom/classnames
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user