Fit condition has been fixed (#320)

main
Boris Sekachev 7 years ago committed by Nikita Manovich
parent cc55c30794
commit 8003a809fe

@ -221,6 +221,8 @@ class PlayerModel extends Listener {
} else { } else {
this._framewiseRotation = {}; this._framewiseRotation = {};
} }
this.fit();
} }
set fps(value) { set fps(value) {
@ -325,8 +327,9 @@ class PlayerModel extends Listener {
}); });
let changed = this._frame.previous != this._frame.current; let changed = this._frame.previous != this._frame.current;
let differentRotation = this._framewiseRotation[this._frame.previous] != this._framewiseRotation[this._frame.current];
// fit if tool is in the annotation mode or frame loading is first in the interpolation mode // fit if tool is in the annotation mode or frame loading is first in the interpolation mode
if (this._settings.resetZoom || !this._settings.rotateAll || this._frame.previous === null) { if (this._settings.resetZoom || this._frame.previous === null || differentRotation) {
this._frame.previous = this._frame.current; this._frame.previous = this._frame.current;
this.fit(); // notify() inside the fit() this.fit(); // notify() inside the fit()
} }

Loading…
Cancel
Save