Add some type hints in ol.Kinetic
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user