# Class: AbstractInteraction

## vcs.vcm.interaction.AbstractInteraction

An abstract interface for all interactions

#### new vcs.vcm.interaction.AbstractInteraction()

### Subclasses

- vcs.vcm.interaction.FeatureAtPixelInteraction

### Members

#### _defaultActive{number}

  A bitmask representing the default events to listen to `vcs.vcm.interaction.EventType`, default is NONE

#### _defaultModificationKey{number}

  The default bitmask for modification keys to listen to, `vcs.vcm.interaction.ModificationKeyType` default is NONE

#### active{number}

  The current active bitmask for `vcs.vcm.interaction.EventType`

#### modificationKey{number}

  The current active `vcs.vcm.interaction.ModificationKeyType`

### Methods

#### handleMapChange(map)

  Actions to perform on map change

  Name | Type | Description
  --- | --- | ---
  `map` | vcs.vcm.maps.Map |

#### pipe(event){Promise.<vcs.vcm.interaction.Event>}

  Main function, called when an event is raised for this interaction

  Name | Type | Description
  --- | --- | ---
  `event` | vcs.vcm.interaction.Event |

#### setActive(active)

  Sets the interaction active. Use boolean (true|false) to toggle default behavior. Pass it a bitmask of `vcs.vcm.interaction.EventType` to change the active state. Call without arguments to reset the default active, modification key and pointer Key behavior

  Name | Type | Description
  --- | --- | ---
  `active` | boolean | number |

#### setModification(mod)

  Sets the modification key to listen to

  Name | Type | Description
  --- | --- | ---
  `mod` | number |

#### setPointer(pointer)

  Sets the pointer key for this interaction$

  Name | Type | Description
  --- | --- | ---
  `pointer` | number |