diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-16 16:13:52 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-16 16:13:52 +0000 |
| commit | f98cb2a7439f96c83f63e6dd4689d57489c13e67 (patch) | |
| tree | 5d296f7228f9ff6b4a3e14d33a4231ec374e2d19 | |
| parent | 4f4144487a076f6a05e3fa7babcb2232719d6b3d (diff) | |
| download | mullvadvpn-f98cb2a7439f96c83f63e6dd4689d57489c13e67.tar.xz mullvadvpn-f98cb2a7439f96c83f63e6dd4689d57489c13e67.zip | |
Skip frame only when alternating animation
| -rw-r--r-- | app/lib/tray-animator.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/lib/tray-animator.js b/app/lib/tray-animator.js index 75a4079112..03522fedbe 100644 --- a/app/lib/tray-animator.js +++ b/app/lib/tray-animator.js @@ -104,14 +104,14 @@ export class TrayAnimation { // clamp range nextFrame = Math.min(Math.max(0, nextFrame), this._numFrames - 1); + + // skip corner frame when alternating by advancing frame once again + nextFrame = this._nextFrame(nextFrame, this._reverse); } else { nextFrame = this._reverse ? this._numFrames - 1 : 0; } - if(this._repeat) { - // repeat animation: skip corner frame by advancing once again - nextFrame = this._nextFrame(nextFrame, this._reverse); - } else { + if(!this._repeat) { // mark animation as finished if it's not marked as repeating this._isFinished = true; } |
