Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TooltipHandler

Graph event handler that displays tooltips. {@link Graph#getTooltip} is used to get the tooltip for a cell or handle. This handler is built-into {@link Graph#tooltipHandler} and enabled using {@link Graph#setTooltips}.

Example:

(code> new mxTooltipHandler(graph); (end)

Constructor: mxTooltipHandler

Constructs an event handler that displays tooltips with the specified delay (in milliseconds). If no delay is specified then a default delay of 500 ms (0.5 sec) is used.

param graph

Reference to the enclosing Graph.

param delay

Optional delay in milliseconds.

Hierarchy

  • TooltipHandler

Implements

  • GraphPlugin

Index

Constructors

constructor

Properties

delay

delay: number

Delay to show the tooltip in milliseconds. Default is 500.

destroyed

destroyed: boolean = false

True if this handler was destroyed using .

div

div: HTMLElement

enabled

enabled: boolean = false

Specifies if events are handled. Default is false.

graph

graph: Graph

Reference to the enclosing Graph.

hideOnHover

hideOnHover: boolean = false

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

ignoreTouchEvents

ignoreTouchEvents: boolean = true

Specifies if touch and pen events should be ignored. Default is true.

lastX

lastX: number = 0

lastY

lastY: number = 0

node

node: any

state

state: null | CellState = null

stateSource

stateSource: boolean = false

thread

thread: null | number = null

zIndex

zIndex: number = 10005

Specifies the zIndex for the tooltip and its shadow. Default is 10005.

Static pluginId

pluginId: string = 'TooltipHandler'

Methods

getStateForEvent

hide

  • hide(): void

hideTooltip

  • hideTooltip(): void

isEnabled

  • isEnabled(): boolean

isHideOnHover

  • isHideOnHover(): boolean

mouseDown

mouseMove

mouseUp

onDestroy

  • onDestroy(): void

reset

resetTimer

  • resetTimer(): void

setEnabled

  • setEnabled(enabled: boolean): void

setHideOnHover

  • setHideOnHover(value: boolean): void

show

  • show(tip: null | string | HTMLElement, x: number, y: number): 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

Generated using TypeDoc