Class: Widget

PANOLENS. Widget


new Widget(container)

Widget for controls
Parameters:
Name Type Description
container HTMLElement A domElement where default control widget will be attached to
Source:

Methods


addControlBar()

Add control bar
Source:

addControlButton(name)

Add buttons on top of control bar
Parameters:
Name Type Description
name string The control button name to be created
Source:

createCustomItem()

Create custom item element
Source:
Returns:
- The dom element icon
Type
HTMLSpanElement

createDefaultMenu()

Create default menu
Source:

createFullscreenButton()

Create Fullscreen button
Source:
Fires:
  • PANOLENS.Widget#event:panolens-viewer-handler
Returns:
- The dom element icon for fullscreen
Type
HTMLSpanElement

createMainMenu(menus)

Create main menu
Parameters:
Name Type Description
menus array Menu array list
Source:
Returns:
- A span element
Type
HTMLDomElement

createMenu()

Create general menu
Source:
Returns:
- A span element
Type
HTMLDomElement

createMenuItem(title)

Create menu item
Parameters:
Name Type Description
title string Title to display
Source:
Returns:
- An anchor tag element
Type
HTMLDomElement

createMenuItemHeader(title)

Create menu item header
Parameters:
Name Type Description
title string Title to display
Source:
Returns:
- An anchor tag element
Type
HTMLDomElement

createSettingButton()

Create Setting button to toggle menu
Source:

createSubMenu(title, items)

Create sub menu
Parameters:
Name Type Description
title string Sub menu title
items array Item array list
Source:
Returns:
- A span element
Type
HTMLDomElement

createVideoControl()

Create video control container
Source:
Returns:
- The dom element icon for video control
Type
HTMLSpanElement

createVideoControlButton()

Create video control button
Source:
Fires:
  • PANOLENS.Widget#event:panolens-viewer-handler
Returns:
- The dom element icon for video control
Type
HTMLSpanElement

createVideoControlSeekbar()

Create video seekbar
Source:
Fires:
  • PANOLENS.Widget#event:panolens-viewer-handler
Returns:
- The dom element icon for video seekbar
Type
HTMLSpanElement

dispose()

Dispose widgets by detaching dom elements from container
Source:

mergeStyleOptions(element, options)

Merge item css style
Parameters:
Name Type Description
element HTMLDOMElement The element to be merged with style
options object The style options
Source:
Returns:
- The same element with merged styles
Type
HTMLDOMElement