fix(network): align resize border with node visual boundary
NodeResizer handles positioned at RF wrapper size, but NodeTooltip and NodeStatusIndicator wrappers had no size constraints, causing BaseNode (w-full h-full) to shrink to content size instead of filling the wrapper. Add w-full h-full to NodeTooltip, NodeTooltipTrigger, and NodeStatusIndicator so the full height chain is maintained. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@ export function NodeStatusIndicator({ status = 'unknown', children, className }:
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'rounded-lg border-2 transition-colors',
|
'w-full h-full rounded-lg border-2 transition-colors',
|
||||||
STATUS_BORDER_COLORS[status],
|
STATUS_BORDER_COLORS[status],
|
||||||
STATUS_GLOW[status],
|
STATUS_GLOW[status],
|
||||||
className,
|
className,
|
||||||
|
|||||||
@@ -14,20 +14,21 @@ const NodeTooltipContext = createContext<NodeTooltipContextValue>({
|
|||||||
hide: () => {},
|
hide: () => {},
|
||||||
})
|
})
|
||||||
|
|
||||||
export function NodeTooltip({ children, ...props }: ComponentProps<'div'>) {
|
export function NodeTooltip({ children, className, ...props }: ComponentProps<'div'>) {
|
||||||
const [visible, setVisible] = useState(false)
|
const [visible, setVisible] = useState(false)
|
||||||
const show = useCallback(() => setVisible(true), [])
|
const show = useCallback(() => setVisible(true), [])
|
||||||
const hide = useCallback(() => setVisible(false), [])
|
const hide = useCallback(() => setVisible(false), [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NodeTooltipContext.Provider value={{ visible, show, hide }}>
|
<NodeTooltipContext.Provider value={{ visible, show, hide }}>
|
||||||
<div {...props}>{children}</div>
|
<div className={cn('w-full h-full', className)} {...props}>{children}</div>
|
||||||
</NodeTooltipContext.Provider>
|
</NodeTooltipContext.Provider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function NodeTooltipTrigger({
|
export function NodeTooltipTrigger({
|
||||||
children,
|
children,
|
||||||
|
className,
|
||||||
onMouseEnter,
|
onMouseEnter,
|
||||||
onMouseLeave,
|
onMouseLeave,
|
||||||
...props
|
...props
|
||||||
@@ -36,6 +37,7 @@ export function NodeTooltipTrigger({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
className={cn('w-full h-full', className)}
|
||||||
onMouseEnter={(e) => {
|
onMouseEnter={(e) => {
|
||||||
show()
|
show()
|
||||||
onMouseEnter?.(e)
|
onMouseEnter?.(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user