From ce56ac90a8d5f5c47c5d6a099b4092d44c65701f Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 22 Jul 2013 18:22:29 +0200 Subject: [PATCH] Add some type hints in ol.Kinetic --- src/ol/kinetic.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ol/kinetic.js b/src/ol/kinetic.js index 0d45bed82e..17e1e27d9c 100644 --- a/src/ol/kinetic.js +++ b/src/ol/kinetic.js @@ -108,10 +108,15 @@ ol.Kinetic.prototype.pan = function(source) { var initialVelocity = this.initialVelocity_; var minVelocity = this.minVelocity_; var duration = this.getDuration_(); - var easingFunction = function(t) { - return initialVelocity * (Math.exp((decay * t) * duration) - 1) / - (minVelocity - initialVelocity); - }; + var easingFunction = ( + /** + * @param {number} t T. + * @return {number} Easing. + */ + function(t) { + return initialVelocity * (Math.exp((decay * t) * duration) - 1) / + (minVelocity - initialVelocity); + }); return ol.animation.pan({ source: source, duration: duration,