Class TooltipHandler

Graph event handler that displays tooltips.

Graph#getTooltip is used to get the tooltip for a cell or handle.

This handler is generally enabled using Graph#setTooltips.

Implements

Constructors

Properties

delay: number = 500

Delay to show the tooltip in milliseconds.

500
destroyed: boolean = false

true if this handler was destroyed using onDestroy.

div: HTMLElement
enabled: boolean = false

Specifies if events are handled.

false
graph: Graph

Reference to the enclosing Graph.

hideOnHover: boolean = false

Specifies if the tooltip should be hidden if the mouse is moved over the current cell.

false
ignoreTouchEvents: boolean = true

Specifies if touch and pen events should be ignored.

true
lastX: number = 0
lastY: number = 0
node: any
state: null | CellState = null
stateSource: boolean = false
thread: null | number = null
zIndex: number = 10005

Specifies the zIndex for the tooltip and its shadow.

10005
pluginId: string = 'TooltipHandler'

Methods

  • Enables or disables event handling.

    This implementation updates enabled.

    Parameters

    • enabled: boolean

    Returns void

  • Shows the tooltip for the specified cell and optional index at the specified location (with a vertical offset of 10 pixels).

    Parameters

    • tip: null | string | HTMLElement
    • x: number
    • y: number

    Returns void