From 8003a809fe724b41954255e6a04d734f957df908 Mon Sep 17 00:00:00 2001 From: Boris Sekachev <40690378+bsekachev@users.noreply.github.com> Date: Thu, 14 Feb 2019 14:10:32 +0300 Subject: [PATCH] Fit condition has been fixed (#320) --- cvat/apps/engine/static/engine/js/player.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cvat/apps/engine/static/engine/js/player.js b/cvat/apps/engine/static/engine/js/player.js index c231e57e..b3daa883 100644 --- a/cvat/apps/engine/static/engine/js/player.js +++ b/cvat/apps/engine/static/engine/js/player.js @@ -221,6 +221,8 @@ class PlayerModel extends Listener { } else { this._framewiseRotation = {}; } + + this.fit(); } set fps(value) { @@ -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() }