Class: Spring

OpenSeadragon.Spring

new Spring(options)

Parameters:
Name Type Description
options Object Spring configuration settings.
Properties
Name Type Attributes Default Description
springStiffness Number Spring stiffness. Must be greater than zero. The closer to zero, the closer to linear animation.
animationTime Number Animation duration per spring, in seconds. Must be zero or greater.
initial Number <optional>
0 Initial value of spring.
exponential Boolean <optional>
false Whether this spring represents an exponential scale (such as zoom) and should be animated accordingly. Note that exponential springs must have non-zero values.
Source:

Members

animationTime :Number

Animation duration per spring.
Type:
  • Number
Source:

current :Object

Type:
  • Object
Properties:
Name Type Description
value Number
time Number
Source:

springStiffness :Number

Spring stiffness.
Type:
  • Number
Source:

start :Object

Type:
  • Object
Properties:
Name Type Description
value Number
time Number
Source:

target :Object

Type:
  • Object
Properties:
Name Type Description
value Number
time Number
Source:

Methods

isAtTargetValue() → {Boolean}

Returns whether the spring is at the target value
Source:
Returns:
True if at target value, false otherwise
Type
Boolean

resetTo(target)

Parameters:
Name Type Description
target Number
Source:

shiftBy(delta)

Parameters:
Name Type Description
delta Number
Source:

springTo(target)

Parameters:
Name Type Description
target Number
Source:

update()

Source:
Returns:
true if the spring is still updating its value, false if it is already at the target value.