mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-26 07:06:10 +03:00
Fixed erroneous asserts in spring
This commit is contained in:
parent
a0a44dbeb5
commit
176e13cb13
@ -41,7 +41,7 @@
|
|||||||
* @param {Number} options.springStiffness - Spring stiffness. Must be greater than zero.
|
* @param {Number} options.springStiffness - Spring stiffness. Must be greater than zero.
|
||||||
* The closer to zero, the closer to linear animation.
|
* The closer to zero, the closer to linear animation.
|
||||||
* @param {Number} options.animationTime - Animation duration per spring, in seconds.
|
* @param {Number} options.animationTime - Animation duration per spring, in seconds.
|
||||||
* Must be greater than zero.
|
* Must be zero or greater.
|
||||||
* @param {Number} [options.initial=0] - Initial value of spring.
|
* @param {Number} [options.initial=0] - Initial value of spring.
|
||||||
* @param {Boolean} [options.exponential=false] - Whether this spring represents
|
* @param {Boolean} [options.exponential=false] - Whether this spring represents
|
||||||
* an exponential scale (such as zoom) and should be animated accordingly. Note that
|
* an exponential scale (such as zoom) and should be animated accordingly. Note that
|
||||||
@ -79,8 +79,8 @@ $.Spring = function( options ) {
|
|||||||
$.console.assert(typeof options.springStiffness === "number" && options.springStiffness !== 0,
|
$.console.assert(typeof options.springStiffness === "number" && options.springStiffness !== 0,
|
||||||
"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number");
|
"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number");
|
||||||
|
|
||||||
$.console.assert(typeof options.animationTime === "number" && options.animationTime !== 0,
|
$.console.assert(typeof options.animationTime === "number" && options.animationTime >= 0,
|
||||||
"[OpenSeadragon.Spring] options.animationTime must be a non-zero number");
|
"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0");
|
||||||
|
|
||||||
if (options.exponential) {
|
if (options.exponential) {
|
||||||
this._exponential = true;
|
this._exponential = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user