Skip to content

frontend-web-editor


Function: UseGrayedNodeHover()

UseGrayedNodeHover(id): object

Defined in: app/hooks/faultTree/useGrayedNodeHover.ts:17

Hook for handling grayed node hover functionality.

This hook provides two functions - handleMouseEnter and handleMouseLeave which are used to implement hover functionality. When mouse is hovered over a grayed node, the entire branch of that node is solidified.

Parameters

id

string

The unique identifier for each node.

Returns

object

handleMouseEnter()

handleMouseEnter: (branchId) => void

Parameters

branchId

string

Returns

void

handleMouseLeave()

handleMouseLeave: (branchId) => void

Parameters

branchId

string

Returns

void

Example

typescript
const { handleMouseEnter, handleMouseLeave } = UseGrayedNodeHover(id);