Class: Tooltip

PSV.components.Tooltip

new PSV.components.Tooltip (psv, size)

Tooltip component

Never instanciate tooltips directly use PSV.services.TooltipRenderer instead

Name Type Description
psv PSV.Viewer
size Object

Extends

Members

arrow HTMLElement packagereadonly

Tooltip arrow

children Array.<PSV.components.AbstractComponent> packagereadonly inherited overrides

All child components

container HTMLElement readonly inherited overrides

prop Object protected inherited overrides

Internal properties

Properties:
Name Type Description
arrow number
border number
width number
height number
pos string
state string
data *

Reference to main controller

Methods

destroy () protected inherited overrides

Destroys the component

hide () overrides

Hides the tooltip

Fires:

isVisible ()boolean inherited overrides

Checks if the component is visible

Returns:
Type Description
boolean

move (config)

Moves the tooltip to a new position

Name Type Description
config PSV.components.Tooltip.Position
Throws:

when the configuration is incorrect

Type
PSV.PSVError

refreshUi () package inherited overrides

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

toggle (visible) inherited overrides

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

PSV.components.Tooltip.Position Object

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 and left, 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