new Collection(opts)
Parameters:
| Name | Type | Description |
|---|---|---|
opts |
Object | Options. |
- Source:
- mapspace/interaction/collection.js
Extends
- ol.Object
Members
-
clock :function
-
Function to calculate current time.
- Source:
- mapspace/interaction/collection.js
-
composedInteractions :Array.<Mapspace.interaction.ComposedInteraction>
-
Array of AxisInteractions that are currently active to be composed.
- Source:
- mapspace/interaction/collection.js
-
composedParameters :Object.<string, number>
-
Object with composed parameters of AxisInteractions.
- Source:
- mapspace/interaction/collection.js
-
composedReturn :Mapspace.interaction.ComposedReturn
-
Object with the result of composing the AxisInteraction parameters.
- Source:
- mapspace/interaction/collection.js
-
interactions :Object.<string, Mapspace.InteractionStatus>
-
Object with the interaction status of added interactions to collecion. Property names are the interaction keys and values are the InteractionStatus.
- Source:
- mapspace/interaction/collection.js
Methods
-
addInteraction(id, interaction [, active])
-
Registers a
Mapspace.interaction.Interaction.Parameters:
Name Type Argument Description idstring ID.
interactionMapspace.interaction.Interaction Interaction.
activeboolean <optional>
If set the interaction as active or not. Default is false.
- Source:
- mapspace/interaction/collection.js
-
getComposedParameters()
-
Returns an object with the composed parameters.
- Source:
- mapspace/interaction/collection.js
Returns:
-
getInteraction(id)
-
Return the
Mapspace.interaction.Interactionfor the given id if exists or undefined.Parameters:
Name Type Description idstring ID.
- Source:
- mapspace/interaction/collection.js
Returns:
- Type
- Mapspace.interaction.Interaction | undefined
-
getParameters(interactionName)
-
Returns the current parameters for the given interaction.
Parameters:
Name Type Description interactionNamestring Name of the interaction.
- Source:
- mapspace/interaction/collection.js
Returns:
- Type
- Object.<string, Object>
-
indexOfInstance(instance)
-
Obtains the index of a
Mapspace.interaction.Interactionin the list of composed interactions.Parameters:
Name Type Description instanceMapspace.interaction.Interaction Interaction instance.
- Source:
- mapspace/interaction/collection.js
Returns:
Returns the positive index if found or -1 if not found.
- Type
- number
-
isComposed(instance)
-
Checks if a
Mapspace.interaction.Interactionhas been added or not to composed interactions.Parameters:
Name Type Description instanceMapspace.interaction.Interaction Interaction instance.
- Source:
- mapspace/interaction/collection.js
Returns:
Returns true if found or false if not found.
- Type
- boolean
-
removeInteraction(id)
-
Unregisters a
Mapspace.interaction.Interaction.Parameters:
Name Type Description idstring ID.
- Source:
- mapspace/interaction/collection.js
-
resetComposedParameters()
-
Resets the composed parameters for all the parametes.
- Source:
- mapspace/interaction/collection.js
-
setInteractionActive(interaction, active)
-
Set a
Mapspace.interaction.Interactionactive or not.Parameters:
Name Type Description interactionMapspace.interaction.Interaction Interaction to change.
activeboolean If set the interaction active or not.
- Source:
- mapspace/interaction/collection.js
-
updateDynamics(storedDynamics, event)
-
Updates the Mapspace.interaction.Dynamics objects.
Parameters:
Name Type Description storedDynamicsObject An object that has parameters as property names and objects as values containing a pair of Mapspace.interaction.Dynamics and time values.
eventEvent Event.
- Source:
- mapspace/interaction/collection.js