Infospot

Infospot

Information spot attached to panorama

Constructor

new Infospot(scaleopt, imageSrcopt, animatedopt)

Source:
Parameters:
Name Type Attributes Default Description
scale number <optional>
300

Default scale

imageSrc string <optional>
PANOLENS.DataImage.Info

Image overlay info

animated boolean <optional>
true

Enable default hover animation

Methods

addHoverElement(el, deltaopt)

Source:

Add hovering element by cloning an element

Parameters:
Name Type Attributes Default Description
el HTMLDOMElement

Element to be cloned and displayed

delta number <optional>
40

Vertical delta to the infospot

addHoverText(text, deltaopt)

Source:

Add hovering text element

Parameters:
Name Type Attributes Default Description
text string

Text to be displayed

delta number <optional>
40

Vertical delta to the infospot

dispose()

Source:

Dispose

enableRaycast(enabledopt)

Source:

Enable raycasting

Parameters:
Name Type Attributes Default Description
enabled boolean <optional>
true

focus(durationopt, easingopt)

Source:

Focus camera center to this infospot

Parameters:
Name Type Attributes Default Description
duration number <optional>
1000

Duration to tween

easing function <optional>
TWEEN.Easing.Exponential.Out

Easing function

getContainer() → {HTMLElement}

Source:

Get container

Returns:
  • The container of this infospot
Type
HTMLElement

hide(delayopt)

Source:

Hide infospot

Parameters:
Name Type Attributes Default Description
delay number <optional>
0

Delay time to hide

lockHoverElement()

Source:

Lock hovering element

onClick(event)

Source:

This will be called by a click event Translate and lock the hovering element if any

Parameters:
Name Type Description
event object

Event containing mouseEvent with clientX and clientY

onDismiss(event)

Source:

Dismiss current element if any

Parameters:
Name Type Description
event object

Dismiss event

onDualEyeEffect(event)

Source:

On dual eye effect handler Creates duplicate left and right element

Parameters:
Name Type Description
event object

panolens-dual-eye-effect event

onHover(event)

Source:

This will be called by a mouse hover event Translate the hovering element if any

Parameters:
Name Type Description
event object

Event containing mouseEvent with clientX and clientY

onHoverEnd()

Source:

This will be called on a mouse hover end Sets cursor style to 'default', hide the element and scale down the infospot

onHoverStart(event)

Source:

This will be called on a mouse hover start Sets cursor style to 'pointer', display the element and scale up the infospot

Parameters:
Name Type Description
event object

removeHoverElement()

Source:

Remove hovering element

setContainer(data)

Source:

Set infospot container

Parameters:
Name Type Description
data HTMLElement | object

Data with container information

setCursorHoverStyle()

Source:

Set cursor css style on hover

setElementStyle(type, element, value)

Source:

Set vendor specific css

Parameters:
Name Type Description
type string

CSS style name

element HTMLElement

The element to be modified

value string

Style value

setFocusMethod()

Source:

Set focus event handler

setText(text)

Source:

Set hovering text content

Parameters:
Name Type Description
text string

Text to be displayed

show(delayopt)

Source:

Show infospot

Parameters:
Name Type Attributes Default Description
delay number <optional>
0

Delay time to show

translateElement(x, y)

Source:

Translate the hovering element by css transform

Parameters:
Name Type Description
x number

X position on the window screen

y number

Y position on the window screen

unlockHoverElement()

Source:

Unlock hovering element

Events

dismiss

Source:

Dimiss event

Type:
  • object

panolens-container

Source:
Properties:
Name Type Description
container HTMLElement

The container of this panorama

Set container event

Type:
  • object

panolens-dual-eye-effect

Source:
Properties:
Name Type Description
mode MODES

Current display mode

Dual eye effect event

Type:
  • object

panolens-dual-eye-effect

Source:
Properties:
Name Type Description
mode MODES

Current display mode

Dual eye effect event

Type:
  • object