new Tooltip( [options])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
options |
Mapspace.control.TooltipOptions |
<optional> |
Tooltip options. |
- Source:
- mapspace/controls/tooltip.js
Extends
- ol.Object
Members
-
animation :boolean|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
boundary :Mapspace.control.TooltipBoundary|Element|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
container :string|Element|boolean|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
delay :number|Object|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
fallbackPlacement :string|Array|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
globalizationKey :string|undefined
-
This is the string that identifies in
Mapspace.strings
this tooltip for globalization purposes.- Source:
- mapspace/controls/tooltip.js
-
html :boolean|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
offset :number|string|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
placement :Mapspace.control.TooltipPlacement|function|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
selector :string|booelan|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
template :string|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
title :string|Element|function|undefined
-
- Source:
- mapspace/controls/tooltip.js
-
trigger :string|undefined
-
- Source:
- mapspace/controls/tooltip.js
Methods
-
clearTooltip()
-
Disposes the Popper internal tooltip but do not disposes this object.
- Source:
- mapspace/controls/tooltip.js
-
getElement()
-
Gets the element that this tooltip is added to or undefined if none.
- Source:
- mapspace/controls/tooltip.js
Returns:
The HTML element.
- Type
- HTMLElement | undefined
-
getEnabled()
-
Gets if the tooltip is enabled or not. Tooltips are enabled by default at init.
- Source:
- mapspace/controls/tooltip.js
Returns:
- Type
- boolean
-
hide()
-
Hides an element’s tooltip. Returns to the caller before the tooltip has actually been hidden. This is considered a “manual” triggering of the tooltip.
- Source:
- mapspace/controls/tooltip.js
-
setElement(element)
-
Sets the element that will be added the tooltip to and updates tooltip.
Parameters:
Name Type Description element
HTMLElement The HTML element.
- Source:
- mapspace/controls/tooltip.js
-
setEnabled(enabled)
-
Sets if the tooltip is enabled or not. Tooltips are enabled by default at init. If the element is not set enabled property is not changed.
Parameters:
Name Type Description enabled
boolean If the tooltip is enabled.
- Source:
- mapspace/controls/tooltip.js
-
show()
-
Reveals an element’s tooltip. Returns to the caller before the tooltip has actually been shown. This is considered a “manual” triggering of the tooltip. Tooltips with zero-length titles are never displayed.
- Source:
- mapspace/controls/tooltip.js
-
toggle()
-
Toggles an element’s tooltip. Returns to the caller before the tooltip has actually been shown or hidden. This is considered a “manual” triggering of the tooltip.
- Source:
- mapspace/controls/tooltip.js
-
toggleEnabled()
-
Toggles if the tooltip is enabled or not. Tooltips are enabled by default at init.
- Source:
- mapspace/controls/tooltip.js
-
updateTooltip()
-
Updates the tooltip. This resets the tooltip and recreates it using the properties stored in the object.
- Source:
- mapspace/controls/tooltip.js