Also highlight the hovered props in the sequence editor panel
This commit is contained in:
parent
4d92ad1932
commit
1b36e8f6f9
2 changed files with 16 additions and 6 deletions
|
@ -45,6 +45,10 @@ const LeftRowHead_Label = styled.span`
|
|||
padding-right: 4px;
|
||||
line-height: 26px;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
${LeftRowHeader}:hover & {
|
||||
color: #ccc;
|
||||
}
|
||||
`
|
||||
|
||||
const LeftRowHead_Icon = styled.span<{isCollapsed: boolean}>`
|
||||
|
@ -93,13 +97,14 @@ const AnyCompositeRow: React.FC<{
|
|||
}) => {
|
||||
const hasChildren = Array.isArray(children) && children.length > 0
|
||||
|
||||
const containerRef = useRef<HTMLLIElement | null>(null)
|
||||
const rowHeaderRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
usePropHighlightMouseEnter(containerRef.current, leaf)
|
||||
usePropHighlightMouseEnter(rowHeaderRef.current, leaf)
|
||||
|
||||
return leaf.shouldRender ? (
|
||||
<LeftRowContainer depth={leaf.depth} ref={containerRef}>
|
||||
<LeftRowContainer depth={leaf.depth}>
|
||||
<LeftRowHeader
|
||||
ref={rowHeaderRef}
|
||||
style={{
|
||||
height: leaf.nodeHeight + 'px',
|
||||
}}
|
||||
|
|
|
@ -77,6 +77,10 @@ const GraphIcon = () => (
|
|||
const PrimitivePropRowHead_Label = styled.span`
|
||||
margin-right: 4px;
|
||||
${propNameTextCSS};
|
||||
|
||||
${PrimitivePropRowHead}:hover & {
|
||||
color: #ccc;
|
||||
}
|
||||
`
|
||||
|
||||
const PrimitivePropRow: React.FC<{
|
||||
|
@ -132,13 +136,14 @@ const PrimitivePropRow: React.FC<{
|
|||
const label = leaf.pathToProp[leaf.pathToProp.length - 1]
|
||||
const isSelectable = true
|
||||
|
||||
const containerRef = useRef<HTMLLIElement | null>(null)
|
||||
const headRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
usePropHighlightMouseEnter(containerRef.current, leaf)
|
||||
usePropHighlightMouseEnter(headRef.current, leaf)
|
||||
|
||||
return (
|
||||
<PrimitivePropRowContainer depth={leaf.depth} ref={containerRef}>
|
||||
<PrimitivePropRowContainer depth={leaf.depth}>
|
||||
<PrimitivePropRowHead
|
||||
ref={headRef}
|
||||
isEven={leaf.n % 2 === 0}
|
||||
style={{
|
||||
height: leaf.nodeHeight + 'px',
|
||||
|
|
Loading…
Reference in a new issue