add code comments to click and mousewheel handlers

This commit is contained in:
Éric Lemoine
2012-07-12 08:14:21 +02:00
parent d517bdc5cd
commit 8801542744
2 changed files with 2 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ ol.handler.Click.prototype.disposeInternal = function() {
* @param {goog.events.BrowserEvent} e
*/
ol.handler.Click.prototype.handleClick = function(e) {
// do not emit a map click event after a drag
if (!this.states_.dragged) {
goog.events.dispatchEvent(this.map_, e);
}

View File

@@ -76,5 +76,6 @@ ol.handler.MouseWheel.prototype.defaultBehavior = function(e) {
map.setZoom(map.getZoom() - step, e.position);
// We don't want the page to scroll.
// (MouseWheelEvent is a BrowserEvent)
e.preventDefault();
};