Graph event handler that displays tooltips. mxGraph.getTooltip is used to get the tooltip for a cell or handle. This handler is built-into <mxGraph.tooltipHandler> and enabled using mxGraph.setTooltips.
(code> new mxTooltipHandler(graph); (end)
mxTooltipHandler | Graph event handler that displays tooltips. |
Functions | |
mxTooltipHandler | Constructs an event handler that displays tooltips with the specified delay (in milliseconds). |
Variables | |
zIndex | Specifies the zIndex for the tooltip and its shadow. |
graph | Reference to the enclosing mxGraph. |
delay | Delay to show the tooltip in milliseconds. |
ignoreTouchEvents | Specifies if touch and pen events should be ignored. |
hideOnHover | Specifies if the tooltip should be hidden if the mouse is moved over the current cell. |
destroyed | True if this handler was destroyed using destroy. |
enabled | Specifies if events are handled. |
Functions | |
isEnabled | Returns true if events are handled. |
setEnabled | Enables or disables event handling. |
isHideOnHover | Returns hideOnHover. |
setHideOnHover | Sets hideOnHover. |
init | Initializes the DOM nodes required for this tooltip handler. |
getStateForEvent | Returns the mxCellState to be used for showing a tooltip for this event. |
mouseDown | Handles the event by initiating a rubberband selection. |
mouseMove | Handles the event by updating the rubberband selection. |
mouseUp | Handles the event by resetting the tooltip timer or hiding the existing tooltip. |
resetTimer | Resets the timer. |
reset | Resets and/or restarts the timer to trigger the display of the tooltip. |
hide | Hides the tooltip and resets the timer. |
hideTooltip | Hides the tooltip. |
show | Shows the tooltip for the specified cell and optional index at the specified location (with a vertical offset of 10 pixels). |
destroy | Destroys the handler and all its resources and DOM nodes. |
function mxTooltipHandler( graph, delay )
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.
graph | Reference to the enclosing mxGraph. |
delay | Optional delay in milliseconds. |
mxTooltipHandler.prototype.graph
Reference to the enclosing mxGraph.
mxTooltipHandler.prototype.destroyed
True if this handler was destroyed using destroy.
mxTooltipHandler.prototype.isEnabled = function()
Returns true if events are handled. This implementation returns enabled.
mxTooltipHandler.prototype.setEnabled = function( enabled )
Enables or disables event handling. This implementation updates enabled.
mxTooltipHandler.prototype.isHideOnHover = function()
Returns hideOnHover.
mxTooltipHandler.prototype.setHideOnHover = function( value )
Sets hideOnHover.
mxTooltipHandler.prototype.getStateForEvent = function( me )
Returns the mxCellState to be used for showing a tooltip for this event.
Constructs an event handler that displays tooltips with the specified delay (in milliseconds).
function mxTooltipHandler( graph, delay )
Specifies the zIndex for the tooltip and its shadow.
mxTooltipHandler.prototype.zIndex
Reference to the enclosing mxGraph.
mxTooltipHandler.prototype.graph
Delay to show the tooltip in milliseconds.
mxTooltipHandler.prototype.delay
Specifies if touch and pen events should be ignored.
mxTooltipHandler.prototype.ignoreTouchEvents
Specifies if the tooltip should be hidden if the mouse is moved over the current cell.
mxTooltipHandler.prototype.hideOnHover
True if this handler was destroyed using destroy.
mxTooltipHandler.prototype.destroyed
Destroys the handler and all its resources and DOM nodes.
mxTooltipHandler.prototype.destroy = function()
Specifies if events are handled.
mxTooltipHandler.prototype.enabled
Returns true if events are handled.
mxTooltipHandler.prototype.isEnabled = function()
Enables or disables event handling.
mxTooltipHandler.prototype.setEnabled = function( enabled )
Returns hideOnHover.
mxTooltipHandler.prototype.isHideOnHover = function()
Sets hideOnHover.
mxTooltipHandler.prototype.setHideOnHover = function( value )
Initializes the DOM nodes required for this tooltip handler.
mxTooltipHandler.prototype.init = function()
Returns the mxCellState to be used for showing a tooltip for this event.
mxTooltipHandler.prototype.getStateForEvent = function( me )
Handles the event by initiating a rubberband selection.
mxTooltipHandler.prototype.mouseDown = function( sender, me )
Handles the event by updating the rubberband selection.
mxTooltipHandler.prototype.mouseMove = function( sender, me )
Handles the event by resetting the tooltip timer or hiding the existing tooltip.
mxTooltipHandler.prototype.mouseUp = function( sender, me )
Resets the timer.
mxTooltipHandler.prototype.resetTimer = function()
Resets and/or restarts the timer to trigger the display of the tooltip.
mxTooltipHandler.prototype.reset = function( me, restart, state )
Hides the tooltip and resets the timer.
mxTooltipHandler.prototype.hide = function()
Hides the tooltip.
mxTooltipHandler.prototype.hideTooltip = function()
Shows the tooltip for the specified cell and optional index at the specified location (with a vertical offset of 10 pixels).
mxTooltipHandler.prototype.show = function( tip, x, y )
Returns the string or DOM node that represents the tooltip for the given state, node and coordinate pair.
mxGraph.prototype.getTooltip = function( state, node, x, y )
Specifies if tooltips should be enabled.
mxGraph.prototype.setTooltips = ( enabled ) =>