Tooltip component
Never instanciate tooltips directly use PSV.services.TooltipRenderer instead
| Name | Type | Description |
|---|---|---|
psv |
PSV.Viewer | |
size |
Object |
Extends
Members
-
Tooltip arrow
-
children Array.<PSV.components.AbstractComponent> packagereadonly inherited overrides
All child components
-
-
-
parent PSV.Viewer | PSV.components.AbstractComponent readonly inherited overrides
-
-
Internal properties
-
Properties:
Name Type Description arrownumber bordernumber widthnumber heightnumber posstring statestring data* -
psv PSV.Viewer readonly inherited overrides
Reference to main controller
-
Methods
-
Destroys the component
-
-
hide () overrides
Hides the tooltip
-
Fires:
-
Checks if the component is visible
-
Returns:
Type Description boolean -
Moves the tooltip to a new position
-
Name Type Description configPSV.components.Tooltip.Position Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
-
-
Refresh UI
-
Must be be a very lightweight operation
-
show (config) package overrides
Displays the tooltip on the viewer Do not call this method directly, use PSV.services.TooltipRenderer instead.
-
Name Type Description configPSV.components.Tooltip.Config Fires:
Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
-
-
This method is not supported
-
Name Type Description visibleboolean optional forced state
Throws:
-
always
- Type
- PSV.PSVError
-
Type Definitions
-
PSV.components.Tooltip.Config PSV.components.Tooltip.Position
Object defining the tooltip configuration
-
Properties:
Name Type Argument Description contentstring HTML content of the tooltip
classNamestring <optional>
Additional CSS class added to the tooltip
data* <optional>
Userdata associated to the tooltip
-
Object defining the tooltip position
-
Properties:
Name Type Argument Default Description topnumber Position of the tip of the arrow of the tooltip, in pixels
leftnumber Position of the tip of the arrow of the tooltip, in pixels
positionstring | Array.<string> <optional>
'top center' Tooltip position toward it's arrow tip. Accepted values are combinations of
top,center,bottomandleft,center,rightboxObject <optional>
Used when displaying a tooltip on a marker
Properties
Name Type Argument Default Description widthnumber <optional>
0 heightnumber <optional>
0