diff --git a/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx b/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx index 84107517e..0d6890759 100644 --- a/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx +++ b/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx @@ -144,13 +144,6 @@ function Visualization2DNode({ /> )); - const hasOverlappingChild = childrenIds - .map((id) => nodes.get(id)) - .find((child) => child?.bounds?.x === 0 || child?.bounds?.y === 0); - - const isZeroWidthOrHeight = - node.bounds?.height === 0 || node.bounds?.width === 0; - const bounds = node.bounds ?? {x: 0, y: 0, width: 0, height: 0}; return ( @@ -184,19 +177,13 @@ function Visualization2DNode({ onSelectNode(nodeId); }}> - {snapshot ? ( + {snapshot && ( - ) : ( - <> - {/* Dirty hack to avoid showing highly overlapping text */} - {!hasOverlappingChild && !isZeroWidthOrHeight && node.bounds - ? node.name - : null} - )} + {isHovered &&

{node.name}

} {children} );