Namespace: Tooltip

Properties

DIV

static

Element

The HTML container. Set once by Blockly.Tooltip.createDom.

HOVER_MS

static

Delay before tooltip appears.

LIMIT

static

Maximum width (in characters) of a tooltip.

MARGINS

static

Horizontal padding between tooltip and screen edge.

OFFSET_X

static

Horizontal offset between mouse cursor and tooltip.

OFFSET_Y

static

Vertical offset between mouse cursor and tooltip.

RADIUS_OK

static

Radius mouse can move before killing tooltip.

visible

static

Is a tooltip currently showing?

Methods

bindMouseEvents

static

bindMouseEvents(element)

Binds the required mouse events onto an SVG element.

Parameter

element

Element

SVG element onto which tooltip is to be bound.

Value must not be null.

block

package   static

block()

Hide any in-progress tooltips and block showing new tooltips until the next call to unblock().

createDom

static

createDom()

Create the tooltip div and inject it onto the page.

dispose

package   static

dispose()

Dispose of the tooltip.

getTooltipOfObject

static

getTooltipOfObject(object) returns string

Returns the tooltip text for the given element.

Parameter

object

Object

The object to get the tooltip text of.

Value may be null.

Returns

string The tooltip text of the element.

hide

static

hide()

Hide the tooltip.

unbindMouseEvents

static

unbindMouseEvents(element)

Unbinds tooltip mouse events from the SVG element.

Parameter

element

Element

SVG element onto which tooltip is bound.

Value must not be null.

unblock

package   static

unblock()

Unblock tooltips: allow them to be scheduled and shown according to their own logic.

Abstract type

TipInfo

static

TipInfo()

A type which can define a tooltip. Either a string, an object containing a tooltip property, or a function which returns either a string, or another arbitrarily nested function which eventually unwinds to a string.