Remove ol.MapBrowserEvent#stopOtherInteractions

and check for false/true in the return from handleMapBrowserEvent. Refs #791.
This commit is contained in:
Éric Lemoine
2013-06-27 08:24:31 +02:00
parent a7ca22dde0
commit 6fc4aa68b6
9 changed files with 22 additions and 22 deletions
@@ -41,6 +41,7 @@ goog.inherits(ol.interaction.DoubleClickZoom, ol.interaction.Interaction);
*/
ol.interaction.DoubleClickZoom.prototype.handleMapBrowserEvent =
function(mapBrowserEvent) {
var stopEvent = false;
var browserEvent = mapBrowserEvent.browserEvent;
if (mapBrowserEvent.type == ol.MapBrowserEvent.EventType.DBLCLICK &&
mapBrowserEvent.isMouseActionButton()) {
@@ -52,6 +53,7 @@ ol.interaction.DoubleClickZoom.prototype.handleMapBrowserEvent =
ol.interaction.Interaction.zoomByDelta(map, view, delta, anchor,
ol.interaction.DOUBLECLICKZOOM_ANIMATION_DURATION);
mapBrowserEvent.preventDefault();
mapBrowserEvent.stopOtherInteractions();
stopEvent = true;
}
return !stopEvent;
};