From 22ecdfd75dddca2ebe73728be2e97406a3ee35dc Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 21 Dec 2023 16:12:19 -0500 Subject: [PATCH] fix documentation for viewport.update --- src/viewport.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/viewport.js b/src/viewport.js index 543d7871..d3849209 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -1133,7 +1133,7 @@ $.Viewport.prototype = { /** * Update the zoom, degrees, and center (X and Y) springs. * @function - * @returns {Boolean} True if any change has been made, false otherwise. + * @returns {Boolean} True if any spring is still animating, false otherwise. */ update: function() { var _this = this; @@ -1158,12 +1158,12 @@ $.Viewport.prototype = { this._oldZoom = this.zoomSpring.current.value; this._oldDegrees = this.degreesSpring.current.value; - var changed = !this.zoomSpring.isAtTargetValue() || - !this.centerSpringX.isAtTargetValue() || - !this.centerSpringY.isAtTargetValue() || - !this.degreesSpring.isAtTargetValue(); + var stillUpdating = !this.zoomSpring.isAtTargetValue() || + !this.centerSpringX.isAtTargetValue() || + !this.centerSpringY.isAtTargetValue() || + !this.degreesSpring.isAtTargetValue(); - return changed; + return stillUpdating; }, // private - pass true to use spring, or a number for degrees for immediate rotation