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 id
string ID.
interaction
Mapspace.interaction.Interaction Interaction.
active
boolean <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.Interaction
for the given id if exists or undefined.Parameters:
Name Type Description id
string 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 interactionName
string Name of the interaction.
- Source:
- mapspace/interaction/collection.js
Returns:
- Type
- Object.<string, Object>
-
indexOfInstance(instance)
-
Obtains the index of a
Mapspace.interaction.Interaction
in the list of composed interactions.Parameters:
Name Type Description instance
Mapspace.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.Interaction
has been added or not to composed interactions.Parameters:
Name Type Description instance
Mapspace.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 id
string 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.Interaction
active or not.Parameters:
Name Type Description interaction
Mapspace.interaction.Interaction Interaction to change.
active
boolean 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 storedDynamics
Object An object that has parameters as property names and objects as values containing a pair of Mapspace.interaction.Dynamics and time values.
event
Event Event.
- Source:
- mapspace/interaction/collection.js