ol.MapBrowserEvent: call browserEvent.{preventDefault|stopPropagation}

This commit is contained in:
Frederic Junod
2013-06-14 09:45:45 +02:00
parent 4392feef1b
commit 2bd87313cd
6 changed files with 20 additions and 4 deletions
+18
View File
@@ -98,6 +98,24 @@ ol.MapBrowserEvent.prototype.isMouseActionButton = function() {
};
/**
* @override
*/
ol.MapBrowserEvent.prototype.preventDefault = function() {
goog.base(this, 'preventDefault');
this.browserEvent.preventDefault();
};
/**
* @override
*/
ol.MapBrowserEvent.prototype.stopPropagation = function() {
goog.base(this, 'stopPropagation');
this.browserEvent.stopPropagation();
};
/**
* @param {ol.Map} map The map with the viewport to listen to events on.