new PSVTooltip( hud )

Description

Tooltip class

Parameters
Name Type Description
hud module:components.PSVHUD

Members


<readonly> container :HTMLElement

Details
HTMLElement

<readonly> parent :PhotoSphereViewer|module:components.PSVComponent


<readonly> psv :PhotoSphereViewer


<readonly> visible :boolean

Visibility of the component

Methods


<protected> create()

Creates the component


<protected> destroy()

Destroys the component


<protected> hide()

Hides the component


hideTooltip()

Hides the tooltip

Fires

Trigered when the tooltip is hidden


isTooltipVisible() → {boolean}

Checks if the tooltip is visible

Returns

<protected> show()

Displays the component


showTooltip( config )

Displays a tooltip on the viewer

Parameters
Name Type Description
config Object
Name Type Attributes Default Description
content string

HTML content of the tootlip

top int

Position of the tip of the arrow of the tooltip, in pixels

left int

Position of the tip of the arrow of the tooltip, in pixels

position string <optional>
'top center'

Tooltip position toward it's arrow tip. Accepted values are combinations of top, center, bottom and left, center, right

className string <optional>

Additional CSS class added to the tooltip

box Object <optional>

Used when displaying a tooltip on a marker

Name Type Attributes Default Description
width int <optional>
0
height int <optional>
0
Examples
viewer.showTooltip({ content: 'Hello world', top: 200, left: 450, position: 'center bottom'})
Fires

Trigered when the tooltip is shown

Throws

when the configuration is incorrect

Events


hide-tooltip

Trigered when the tooltip is hidden


show-tooltip

Trigered when the tooltip is shown