diff --git a/src/viewport.js b/src/viewport.js index 3bd51ac8..543d7871 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -1153,18 +1153,16 @@ $.Viewport.prototype = { this.degreesSpring.update(); } - - var changed = this.centerSpringX.current.value !== this._oldCenterX || - this.centerSpringY.current.value !== this._oldCenterY || - this.zoomSpring.current.value !== this._oldZoom || - this.degreesSpring.current.value !== this._oldDegrees; - - this._oldCenterX = this.centerSpringX.current.value; this._oldCenterY = this.centerSpringY.current.value; 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(); + return changed; },