Class: EditTrailRoutingLayerKeyShortCuts

alk.interaction.EditTrailRoutingLayerKeyShortCuts

An object of this class gives an interaction that assigns key codes and modifiers to the prevRoute, and nextRoute operations of a alk.layer.EditTrailRoutingLayer.

The defaults are:

  • CTRL-Z or META-Z calls prevRoute.
  • CTRL-SHIFT-Z or META-SHIFT-Z calls nextRoute.
  • CTRL-Y or META-Y calls nextRoute.

new alk.interaction.EditTrailRoutingLayerKeyShortCuts(options)

This constructor creates an Interaction object that responds to certain keys that are used in manipulating the Edit Trail Routing Layer.

Option Type Description
routingLayer alk.layer.EditTrailRoutingLayer

This option holds the reference to the alk.layer.EditTrailRoutingLayer.

prevRouteCondition ol.EventsConditionType

This option holds the condition to call alk.layer.EditTrailRoutingLayer#prevRoute. The default is CTRL-Z or META-Z.

nextRouteCondition ol.EventsConditionType

This option holds the condition to call alk.layer.EditTrailRoutingLayer#nextRoute. The default is CTRL-SHIFT-Z, META-SHIFT-Z, CTRL-Y, or META-Y.

Extends

  • ol.interaction.Interaction

Methods

handleMapBrowserEvent(mapBrowserEvent){boolean}

Handles the map browser event if it was a KeyEvent, and decides to call 'prevRoute' or 'nextRoute' on the associated alk.layer.EditTrailRoutingLayer.

Name Type Description
mapBrowserEvent ol.MapBrowserEvent

Map browser event.

Returns:
false to stop event propagation.