Type.registerNamespace("Sys.Extended.UI.Seadragon");Type.registerNamespace("Seadragon");Seadragon.Spring=Sys.Extended.UI.Seadragon.Spring=function(b,c){var a=this;a._currentValue=typeof b=="number"?b:0;a._startValue=a._currentValue;a._targetValue=a._currentValue;a.config=c;a._currentTime=(new Date).getTime();a._startTime=a._currentTime;a._targetTime=a._currentTime};Sys.Extended.UI.Seadragon.Spring.prototype={_transform:function(b){var a=this.config.springStiffness;return (1-Math.exp(-b*a))/(1-Math.exp(-a))},getCurrent:function(){return this._currentValue},getTarget:function(){return this._targetValue},resetTo:function(b){var a=this;a._targetValue=b;a._targetTime=a._currentTime;a._startValue=a._targetValue;a._startTime=a._targetTime},springTo:function(b){var a=this;a._startValue=a._currentValue;a._startTime=a._currentTime;a._targetValue=b;a._targetTime=a._startTime+1e3*a.config.animationTime},shiftBy:function(a){this._startValue+=a;this._targetValue+=a},update:function(){var a=this;a._currentTime=(new Date).getTime();a._currentValue=a._currentTime>=a._targetTime?a._targetValue:a._startValue+(a._targetValue-a._startValue)*a._transform((a._currentTime-a._startTime)/(a._targetTime-a._startTime))}};Sys.Extended.UI.Seadragon.Spring.registerClass("Sys.Extended.UI.Seadragon.Spring",null,Sys.IDisposable);