better type checking

This commit is contained in:
Éric Lemoine
2012-07-09 20:51:28 +02:00
parent 127a2c9606
commit aebfb643ac
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ ol.control.Navigation.prototype.deactivate = function() {
}; };
/** /**
* @param {Object} evt * @param {{deltaX, deltaY}} evt
*/ */
ol.control.Navigation.prototype.moveMap = function(evt) { ol.control.Navigation.prototype.moveMap = function(evt) {
this.map_.moveByViewportPx(evt.deltaX, evt.deltaY); 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) { ol.control.Navigation.prototype.zoomMap = function(evt) {
var me = this; var me = this;
+3
View File
@@ -23,6 +23,9 @@ ol.handler.MouseWheel = function(map, elt) {
var handler = new goog.events.MouseWheelHandler(elt); var handler = new goog.events.MouseWheelHandler(elt);
this.registerDisposable(handler); this.registerDisposable(handler);
/**
* @param {goog.events.MouseWheelEvent} e
*/
var handleMouseWheel = function(e) { var handleMouseWheel = function(e) {
e.position = goog.style.getRelativePosition(e, elt); e.position = goog.style.getRelativePosition(e, elt);
e.type = 'mousewheel'; e.type = 'mousewheel';