From aebfb643acd6c70f7dbfe932bb9090580e33eebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 9 Jul 2012 20:51:28 +0200 Subject: [PATCH] better type checking --- src/ol/control/Navigation.js | 4 ++-- src/ol/handler/MouseWheel.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ol/control/Navigation.js b/src/ol/control/Navigation.js index d38cecdc9b..25427736ad 100644 --- a/src/ol/control/Navigation.js +++ b/src/ol/control/Navigation.js @@ -55,7 +55,7 @@ ol.control.Navigation.prototype.deactivate = function() { }; /** - * @param {Object} evt + * @param {{deltaX, deltaY}} evt */ ol.control.Navigation.prototype.moveMap = function(evt) { this.map_.moveByViewportPx(evt.deltaX, evt.deltaY); @@ -63,7 +63,7 @@ ol.control.Navigation.prototype.moveMap = function(evt) { }; /** - * @param {Event} evt + * @param {goog.events.MouseWheelEvent} evt */ ol.control.Navigation.prototype.zoomMap = function(evt) { var me = this; diff --git a/src/ol/handler/MouseWheel.js b/src/ol/handler/MouseWheel.js index ac0a3e4682..6a551db20c 100644 --- a/src/ol/handler/MouseWheel.js +++ b/src/ol/handler/MouseWheel.js @@ -23,6 +23,9 @@ ol.handler.MouseWheel = function(map, elt) { var handler = new goog.events.MouseWheelHandler(elt); this.registerDisposable(handler); + /** + * @param {goog.events.MouseWheelEvent} e + */ var handleMouseWheel = function(e) { e.position = goog.style.getRelativePosition(e, elt); e.type = 'mousewheel';