From c7d133ba3d561867103fc9484ea15413348debbf Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 21 Oct 2020 19:48:04 +0200 Subject: [PATCH] ensure aspect ratio only gets changed on aspect ratio changes --- src/ext/lib/video-transform/Resizer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 12e31d7..3757e8a 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -155,11 +155,11 @@ class Resizer { // reset zoom, but only on aspect ratio switch. We also know that aspect ratio gets converted to // AspectRatio.Fixed when zooming, so let's keep that in mind - if (ar.type !== AspectRatio.Fixed) { - this.zoom.reset(); - this.resetPan(); - } else if (ar.ratio !== this.lastAr.ratio) { - // we must check against this.lastAR.ratio because some calls provide same value for ar and lastAr + if ( + (ar.type !== AspectRatio.Fixed && ar.type !== AspectRatio.Manual) // anything not these two _always_ changes AR + || ar.type !== this.lastAr.type // this also means aspect ratio has changed + || ar.ratio !== this.lastAr.ratio // this also means aspect ratio has changed + ) { this.zoom.reset(); this.resetPan(); }