diff --git a/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts b/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts index afdc61e57..ac12f5470 100644 --- a/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts +++ b/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts @@ -15,4 +15,7 @@ export class CanvasDefaults { static readonly STEP_TOOLBAR_WIDTH = 350; static readonly STEP_TOOLBAR_HEIGHT = 60; + + static readonly HOVER_DELAY_IN = 200; + static readonly HOVER_DELAY_OUT = 500; } diff --git a/packages/ui/src/components/Visualization/Custom/Node/CustomNode.tsx b/packages/ui/src/components/Visualization/Custom/Node/CustomNode.tsx index 827c213bc..35dfca24d 100644 --- a/packages/ui/src/components/Visualization/Custom/Node/CustomNode.tsx +++ b/packages/ui/src/components/Visualization/Custom/Node/CustomNode.tsx @@ -48,8 +48,11 @@ const CustomNode: FunctionComponent = observer(({ element, onCo const validationText = vizNode?.getNodeValidationText(); const doesHaveWarnings = !isDisabled && !!validationText; const [isSelected, onSelect] = useSelection(); - const [isGHover, gHoverRef] = useHover(); - const [isToolbarHover, toolbarHoverRef] = useHover(); + const [isGHover, gHoverRef] = useHover(CanvasDefaults.HOVER_DELAY_IN, CanvasDefaults.HOVER_DELAY_OUT); + const [isToolbarHover, toolbarHoverRef] = useHover( + CanvasDefaults.HOVER_DELAY_IN, + CanvasDefaults.HOVER_DELAY_OUT, + ); const childCount = element.getAllNodeChildren().length; const boxRef = useRef(element.getBounds()); const shouldShowToolbar =