|
@@ -733,7 +733,7 @@ class BestFitResizeStrategy extends ImmersiveResizeStrategy
|
733
|
733
|
{
|
734
|
734
|
const subContainer = viewport._subContainer;
|
735
|
735
|
const windowAspectRatio = window.innerWidth / window.innerHeight;
|
736
|
|
- const viewportAspectRatio = viewport._realSize.width / viewport._realSize.height;
|
|
736
|
+ const viewportAspectRatio = viewport.aspectRatio;
|
737
|
737
|
let width = 1, height = 1, left = '0px', top = '0px';
|
738
|
738
|
|
739
|
739
|
if(viewportAspectRatio <= windowAspectRatio) {
|
|
@@ -904,10 +904,16 @@ export class Viewport extends ViewportEventTarget
|
904
|
904
|
*/
|
905
|
905
|
get virtualSize(): SpeedySize
|
906
|
906
|
{
|
907
|
|
- const size = this._realSize;
|
908
|
|
- const aspectRatio = size.width / size.height;
|
|
907
|
+ return Utils.resolution(this._resolution, this.aspectRatio);
|
|
908
|
+ }
|
909
|
909
|
|
910
|
|
- return Utils.resolution(this._resolution, aspectRatio);
|
|
910
|
+ /**
|
|
911
|
+ * Aspect ratio of the viewport
|
|
912
|
+ */
|
|
913
|
+ get aspectRatio(): number
|
|
914
|
+ {
|
|
915
|
+ const size = this._realSize;
|
|
916
|
+ return size.width / size.height;
|
911
|
917
|
}
|
912
|
918
|
|
913
|
919
|
/**
|