Add ol.MapBrowserEvent.stopOtherInteractions
When called, stops the interaction chain.
This commit is contained in:
@@ -52,5 +52,6 @@ ol.interaction.DoubleClickZoom.prototype.handleMapBrowserEvent =
|
||||
ol.interaction.Interaction.zoomByDelta(map, view, delta, anchor,
|
||||
ol.interaction.DOUBLECLICKZOOM_ANIMATION_DURATION);
|
||||
mapBrowserEvent.preventDefault();
|
||||
mapBrowserEvent.stopOtherInteractions();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -82,6 +82,7 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
|
||||
ol.interaction.Interaction.pan(
|
||||
map, view, delta, ol.interaction.KEYBOARD_PAN_DURATION);
|
||||
mapBrowserEvent.preventDefault();
|
||||
mapBrowserEvent.stopOtherInteractions();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -63,6 +63,7 @@ ol.interaction.KeyboardZoom.prototype.handleMapBrowserEvent =
|
||||
ol.interaction.Interaction.zoomByDelta(map, view, delta, undefined,
|
||||
ol.interaction.KEYBOARD_ZOOM_DURATION);
|
||||
mapBrowserEvent.preventDefault();
|
||||
mapBrowserEvent.stopOtherInteractions();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -93,6 +93,7 @@ ol.interaction.MouseWheelZoom.prototype.handleMapBrowserEvent =
|
||||
goog.bind(this.doZoom_, this, map), timeLeft);
|
||||
|
||||
mapBrowserEvent.preventDefault();
|
||||
mapBrowserEvent.stopOtherInteractions();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user