Add an "handleEvent" interaction option

This commit is contained in:
Éric Lemoine
2014-12-08 17:52:34 +01:00
parent df170859cc
commit d07185e8f2
15 changed files with 139 additions and 86 deletions

View File

@@ -137,22 +137,6 @@ oli.control.Control.prototype.setMap = function(map) {};
oli.interaction;
/**
* @interface
*/
oli.interaction.Interaction = function() {};
/**
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
* @return {boolean} Whether the map browser event should continue
* through the chain of interactions. `false` means stop, `true`
* means continue.
*/
oli.interaction.Interaction.prototype.handleMapBrowserEvent =
function(mapBrowserEvent) {};
/**
* @interface
*/

View File

@@ -172,6 +172,25 @@ olx.GraticuleOptions.prototype.strokeStyle;
olx.GraticuleOptions.prototype.targetSize;
/**
* Object literal with config options for interactions.
* @typedef {{handleEvent: function(ol.MapBrowserEvent):boolean}}
* @api
*/
olx.interaction.InteractionOptions;
/**
* Method called by the map to notify the interaction that a browser event was
* dispatched to the map. The function may return `false` to prevent the
* propagation of the event to other interactions in the map's interactions
* chain. Required.
* @type {function(ol.MapBrowserEvent):boolean}
* @api
*/
olx.interaction.InteractionOptions.prototype.handleEvent;
/**
* Object literal with config options for the map.
* @typedef {{controls: (ol.Collection.<ol.control.Control>|Array.<ol.control.Control>|undefined),
@@ -2410,6 +2429,24 @@ olx.interaction.PinchZoomOptions;
olx.interaction.PinchZoomOptions.prototype.duration;
/**
* @typedef {{handleEvent: function(ol.MapBrowserEvent):boolean}}
* @api
*/
olx.interaction.PointerOptions;
/**
* Method called by the map to notify the interaction that a browser event was
* dispatched to the map. The function may return `false` to prevent the
* propagation of the event to other interactions in the map's interactions
* chain.
* @type {function(ol.MapBrowserEvent):boolean}
* @api
*/
olx.interaction.PointerOptions.prototype.handleEvent;
/**
* @typedef {{addCondition: (ol.events.ConditionType|undefined),
* condition: (ol.events.ConditionType|undefined),