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 arrow
number border
number width
number height
number pos
string state
string 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 config
PSV.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 config
PSV.components.Tooltip.Config Fires:
Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
-
-
This method is not supported
-
Name Type Description visible
boolean 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 content
string HTML content of the tooltip
className
string <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 top
number Position of the tip of the arrow of the tooltip, in pixels
left
number Position of the tip of the arrow of the tooltip, in pixels
position
string | Array.<string> <optional>
'top center' Tooltip position toward it's arrow tip. Accepted values are combinations of
top
,center
,bottom
andleft
,center
,right
box
Object <optional>
Used when displaying a tooltip on a marker
Properties
Name Type Argument Default Description width
number <optional>
0 height
number <optional>
0