new Infospot( [scale] [, imageSrc] [, animated])
Information spot attached to panorama
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
scale |
number |
<optional> |
300 | Infospot scale |
imageSrc |
imageSrc |
<optional> |
PANOLENS.DataImage.Info | Image overlay info |
animated |
boolean |
<optional> |
true | Enable default hover animation |
- Source:
Methods
-
addHoverElement(el [, delta])
-
Add hovering element by cloning an element
Parameters:
Name Type Argument Default Description el
HTMLDOMElement Element to be cloned and displayed delta
number <optional>
40 Vertical delta to the infospot - Source:
-
addHoverText(text [, delta])
-
Add hovering text element
Parameters:
Name Type Argument Default Description text
string Text to be displayed delta
number <optional>
40 Vertical delta to the infospot - Source:
-
dispose()
-
Dispose infospot
- Source:
-
focus( [duration] [, easing])
-
Focus camera center to this infospot
Parameters:
Name Type Argument Default Description duration
number <optional>
1000 Duration to tween easing
function <optional>
TWEEN.Easing.Exponential.Out Easing function - Source:
-
getContainer()
-
Get container
- Source:
Returns:
- The container of this infospot- Type
- HTMLElement
-
hide( [delay])
-
Hide infospot
Parameters:
Name Type Argument Default Description delay
number <optional>
0 Delay time to hide - Source:
-
lockHoverElement()
-
Lock hovering element
- Source:
-
onClick(event)
-
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 - Source:
-
onDismiss(event)
-
Dismiss current element if any
Parameters:
Name Type Description event
object Dismiss event - Source:
-
onDualEyeEffect(event)
-
On dual eye effect handler Creates duplicate left and right element
Parameters:
Name Type Description event
object panolens-dual-eye-effect event - Source:
-
onHover(event)
-
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 - Source:
-
onHoverEnd()
-
This will be called on a mouse hover end Sets cursor style to 'default', hide the element and scale down the infospot
- Source:
-
onHoverStart()
-
This will be called on a mouse hover start Sets cursor style to 'pointer', display the element and scale up the infospot
- Source:
-
removeHoverElement()
-
Remove hovering element
- Source:
-
setContainer(data)
-
Set infospot container
Parameters:
Name Type Description data
HTMLElement | object Data with container information - Source:
-
setCursorHoverStyle()
-
Set cursor css style on hover
- Source:
-
setElementStyle(type, element, value)
-
Set vendor specific css
Parameters:
Name Type Description type
string CSS style name element
HTMLElement The element to be modified value
string Style value - Source:
-
setFocusMethod()
-
Set focus event handler
- Source:
-
setText(text)
-
Set hovering text content
Parameters:
Name Type Description text
string Text to be displayed - Source:
-
show( [delay])
-
Show infospot
Parameters:
Name Type Argument Default Description delay
number <optional>
0 Delay time to show - Source:
-
translateElement(x, y)
-
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 - Source:
-
unlockHoverElement()
-
Unlock hovering element
- Source:
Events
-
dismiss
-
Dimiss event
Type: object
- Source:
-
panolens-container
-
Set container event
Type: object
- Source:
Properties:
Name Type Description container
HTMLElement The container of this panorama -
panolens-dual-eye-effect
-
Dual eye effect event
Type: object
- Source:
Properties:
Name Type Description mode
PANOLENS.Modes Current display mode -
panolens-dual-eye-effect
-
Dual eye effect event
Type: object
- Source:
Properties:
Name Type Description mode
PANOLENS.Modes Current display mode