Also highlight sheet objects

This commit is contained in:
Aria Minaei 2022-06-13 15:01:25 +02:00 committed by Aria
parent 58bf030aaa
commit 4d92ad1932

View file

@ -10,13 +10,17 @@ export function usePropHighlightMouseEnter(
) { ) {
useLayoutEffect(() => { useLayoutEffect(() => {
if (!node) return if (!node) return
if (leaf.type !== 'propWithChildren' && leaf.type !== 'primitiveProp') if (
leaf.type !== 'propWithChildren' &&
leaf.type !== 'primitiveProp' &&
leaf.type !== 'sheetObject'
)
return return
let unlock: null | (() => void) = null let unlock: null | (() => void) = null
const propAddress: PropAddress = { const propAddress: PropAddress = {
...leaf.sheetObject.address, ...leaf.sheetObject.address,
pathToProp: leaf.pathToProp, pathToProp: leaf.type === 'sheetObject' ? [] : leaf.pathToProp,
} }
function onMouseEnter() { function onMouseEnter() {