update animating logic

This commit is contained in:
Tom 2023-12-21 16:09:45 -05:00
parent 40a4e42835
commit bbee6e9605

View File

@ -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;
},