Skip to content

Commit

Permalink
Fit condition has been fixed (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored and nmanovic committed Feb 14, 2019
1 parent cc55c30 commit 8003a80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cvat/apps/engine/static/engine/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ class PlayerModel extends Listener {
} else {
this._framewiseRotation = {};
}

this.fit();
}

set fps(value) {
Expand Down Expand Up @@ -325,8 +327,9 @@ class PlayerModel extends Listener {
});

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
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.fit(); // notify() inside the fit()
}
Expand Down

0 comments on commit 8003a80

Please sign in to comment.