Class: AxisInteraction

Mapspace.interaction. AxisInteraction

An interaction to control a viewer that capture input devices that modify an axis parameter or parameters that change along a range of values, usually between 0 to 1 or -1 to 1. Usually this axis parameters change over time once the initial value is set. Examples of these are drag interactions with the mouse or the finger in a touch display. Also the mouse wheel or the zoom pinch gesture in a touch panel.


new AxisInteraction( [options])

Parameters:
Name Type Argument Description
options Mapspace.interaction.InteractionOptions <optional>

Options.

Source:
mapspace/interaction/axisinteraction.js
Fires:
  • ol.Object.Event#event:change:active

Extends

Members


parameters :Object.<string, Mapspace.interaction.Dynamics>

The object that stores values for the parameters this interaction modifies. Property names of the object are the parameter names and values are objects of type Dynamics.

Overrides:
Source:
mapspace/interaction/axisinteraction.js

Methods


getActive()

Return whether the interaction is currently active.

Inherited From:
Source:
mapspace/interaction/interaction.js
Returns:

true if the interaction is active, false otherwise.

Type
boolean

getElement()

Return the DOM element where the events are listened to.

Inherited From:
Source:
mapspace/interaction/interaction.js
Returns:
Type
Element

setActive(active)

Activate or deactivate the interaction.

Parameters:
Name Type Description
active boolean

Active.

Inherited From:
Source:
mapspace/interaction/interaction.js