Class: Interaction

bu.interaction. Interaction

An interaction to control a viewer. Each interaction captures one or several input device events, as keyboard keystrokes, or mouse movements, or touch gestures, and translates them into parameter values. There are two types of parameter values: static ones, that are captured and do not change along the time, and dynamics, that are values with a velocity and friction, that change along time from initial value to zero. Once captured this values interactions then trigger events sending them out.


new Interaction( [options])

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

Options.

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

Extends

  • ol.Object

Members


parameters :Object.<string, Object>

The object that stores values for the parameters this interaction modifies. Property names of the object are the parameter names and values are different types of objects that must be defined in derived classes.

Type:
  • Object.<string, Object>
Source:
bu/interaction/interaction.js

Methods


getActive()

Return whether the interaction is currently active.

Source:
bu/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.

Source:
bu/interaction/interaction.js
Returns:
Type
Element

setActive(active)

Activate or deactivate the interaction.

Parameters:
Name Type Description
active boolean

Active.

Source:
bu/interaction/interaction.js