Class: Control

OpenSeadragon.Control

A Control represents any interface element which is meant to allow the user to interact with the zoomable interface. Any control can be anchored to any element.

Constructor

new Control(element, options, container)

Parameters:
Name Type Description
element Element the control element to be anchored in the container.
options Object All required and optional settings for configuring a control element.
Properties
Name Type Attributes Default Description
anchor OpenSeadragon.ControlAnchor <optional>
OpenSeadragon.ControlAnchor.NONE the position of the control relative to the container.
attachToViewer Boolean <optional>
true Whether the control should be added directly to the viewer, or directly to the container
autoFade Boolean <optional>
true Whether the control should have the autofade behavior
container Element the element to control will be anchored too.
Source:

Members

anchor :OpenSeadragon.ControlAnchor

The position of the Control relative to its container.
Type:
Source:

autoFade :Boolean

True if the control should have autofade behavior.
Type:
  • Boolean
Source:

container :Element

The Control's containing element.
Type:
  • Element
Source:

element :Element

The element providing the user interface with some type of control (e.g. a zoom-in button).
Type:
  • Element
Source:

wrapper :Element

A neutral element surrounding the control element.
Type:
  • Element
Source:

Methods

destroy()

Removes the control from the container.
Source:

isVisible() → {Boolean}

Determines if the control is currently visible.
Source:
Returns:
true if currently visible, false otherwise.
Type
Boolean

setOpacity(opactiy)

Sets the opacity level for the control.
Parameters:
Name Type Description
opactiy Number a value between 1 and 0 inclusively.
Source:

setVisible(visible)

Toggles the visibility of the control.
Parameters:
Name Type Description
visible Boolean true to make visible, false to hide.
Source: