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
+3 -1
View File
@@ -52,6 +52,7 @@ goog.inherits(ol.interaction.KeyboardPan, ol.interaction.Interaction);
*/
ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
function(mapBrowserEvent) {
var stopEvent = false;
if (mapBrowserEvent.type == goog.events.KeyHandler.EventType.KEY) {
var keyEvent = /** @type {goog.events.KeyEvent} */
(mapBrowserEvent.browserEvent);
@@ -81,7 +82,8 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
ol.interaction.Interaction.pan(
map, view, delta, ol.interaction.KEYBOARD_PAN_DURATION);
mapBrowserEvent.preventDefault();
mapBrowserEvent.stopOtherInteractions();
stopEvent = true;
}
}
return !stopEvent;
};