Blockly. Tooltip
Properties
DIV
Element
The HTML container. Set once by Blockly.Tooltip.createDom.
HOVER_MS
Delay before tooltip appears.
LIMIT
Maximum width (in characters) of a tooltip.
MARGINS
Horizontal padding between tooltip and screen edge.
OFFSET_X
Horizontal offset between mouse cursor and tooltip.
OFFSET_Y
Vertical offset between mouse cursor and tooltip.
RADIUS_OK
Radius mouse can move before killing tooltip.
visible
Is a tooltip currently showing?
Methods
bindMouseEvents
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
block()
Hide any in-progress tooltips and block showing new tooltips until the next call to unblock().
createDom
createDom()
Create the tooltip div and inject it onto the page.
dispose
dispose()
Dispose of the tooltip.
getTooltipOfObject
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
hide()
Hide the tooltip.
unbindMouseEvents
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
unblock()
Unblock tooltips: allow them to be scheduled and shown according to their own logic.
Abstract type
TipInfo
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.