ensure aspect ratio only gets changed on aspect ratio changes
This commit is contained in:
parent
47475ac597
commit
c7d133ba3d
@ -155,11 +155,11 @@ class Resizer {
|
|||||||
|
|
||||||
// reset zoom, but only on aspect ratio switch. We also know that aspect ratio gets converted to
|
// 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
|
// AspectRatio.Fixed when zooming, so let's keep that in mind
|
||||||
if (ar.type !== AspectRatio.Fixed) {
|
if (
|
||||||
this.zoom.reset();
|
(ar.type !== AspectRatio.Fixed && ar.type !== AspectRatio.Manual) // anything not these two _always_ changes AR
|
||||||
this.resetPan();
|
|| ar.type !== this.lastAr.type // this also means aspect ratio has changed
|
||||||
} else if (ar.ratio !== this.lastAr.ratio) {
|
|| ar.ratio !== this.lastAr.ratio // this also means aspect ratio has changed
|
||||||
// we must check against this.lastAR.ratio because some calls provide same value for ar and lastAr
|
) {
|
||||||
this.zoom.reset();
|
this.zoom.reset();
|
||||||
this.resetPan();
|
this.resetPan();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user