Add an "handleEvent" interaction option
This commit is contained in:
@@ -26,7 +26,9 @@ ol.interaction.DoubleClickZoom = function(opt_options) {
|
||||
*/
|
||||
this.delta_ = goog.isDef(options.delta) ? options.delta : 1;
|
||||
|
||||
goog.base(this);
|
||||
goog.base(this, {
|
||||
handleEvent: ol.interaction.DoubleClickZoom.handleEvent
|
||||
});
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -39,10 +41,12 @@ goog.inherits(ol.interaction.DoubleClickZoom, ol.interaction.Interaction);
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||
* @return {boolean} `false` to stop event propagation.
|
||||
* @this {ol.interaction.DoubleClickZoom}
|
||||
* @api
|
||||
*/
|
||||
ol.interaction.DoubleClickZoom.prototype.handleMapBrowserEvent =
|
||||
function(mapBrowserEvent) {
|
||||
ol.interaction.DoubleClickZoom.handleEvent = function(mapBrowserEvent) {
|
||||
var stopEvent = false;
|
||||
var browserEvent = mapBrowserEvent.browserEvent;
|
||||
if (mapBrowserEvent.type == ol.MapBrowserEvent.EventType.DBLCLICK) {
|
||||
|
||||
Reference in New Issue
Block a user