Add some type hints in ol.Kinetic

This commit is contained in:
Tom Payne
2013-07-22 18:22:29 +02:00
parent 639000a603
commit ce56ac90a8

View File

@@ -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,