A cached reference to the global tooltip element
A reference to the HTML element which is currently tool-tipped, if any.
Private
#activeIs the tooltip currently active?
Private
#activationA reference to a window timeout function when an element is activated.
Private
#deactivationA reference to a window timeout function when an element is deactivated.
Private
#pendingAn element which is pending tooltip activation if hover is sustained
Private
#lockedMaintain state about active locked tooltips in order to perform appropriate automatic dismissal.
Static
TOOLTIP_An amount of margin which is used to offset tooltips from their anchored element.
Static
TOOLTIP_The number of milliseconds delay which activates a tooltip on a "long hover".
Static
TOOLTIP_The directions in which a tooltip can extend, relative to its tool-tipped element.
Static
LOCKED_The number of pixels buffer around a locked tooltip zone before they should be dismissed.
Activate the tooltip for a hovered HTML element which defines a tooltip localization key.
The HTML element being hovered.
Optional
options: { Additional options which can override tooltip behavior.
Explicit tooltip text to display. If this is not provided the tooltip text is acquired from the elements data-tooltip attribute. This text will be automatically localized
An explicit tooltip expansion direction. If this is not provided the direction is acquired from the data-tooltip-direction attribute of the element or one of its parents.
An optional, space-separated list of CSS classes to apply to the activated tooltip. If this is not provided, the CSS classes are acquired from the data-tooltip-class attribute of the element or one of its parents.
An optional boolean to lock the tooltip after creation. Defaults to false.
Explicit HTML content to inject into the tooltip rather than using tooltip text.
Create a locked tooltip at the given position.
A position object with coordinates for where the tooltip should be placed
Explicit top position for the tooltip
Explicit right position for the tooltip
Explicit bottom position for the tooltip
Explicit left position for the tooltip
Explicit tooltip text or HTML to display.
Optional
options: { Additional options which can override tooltip behavior.
An optional, space-separated list of CSS classes to apply to the activated tooltip.
Protected
_onProtected
_onProtected
_determineProtected
_setProtected
Set tooltip position relative to an HTML element using an explicitly provided data-tooltip-direction.
The tooltip expansion direction specified by the element or a parent element.
Protected
_setPrivate
#onPrivate
#onPrivate
#startPrivate
#clearPrivate
#computePrivate
#test
A singleton Tooltip Manager class responsible for rendering and positioning a dynamic tooltip element which is accessible as
game.tooltip
.See
Game.tooltip
Example: API Usage
Example: HTML Usage