File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,9 @@ export default {
7878 const aspectRatio = computed (() => {
7979 const width = window .innerWidth ;
8080 const height = window .innerHeight ;
81- const isDesktop = ! $q .platform .is .desktop ;
8281 // must parse float aspect ratio value
8382 return parseFloat (
84- // format aspectRatio to landscape for desktop
85- _isPortrait () && ! isDesktop ?
86- height / width : width / height).toFixed (3 );
83+ _isPortrait () ? height / width : width / height).toFixed (3 );
8784 });
8885
8986 // Lifecycle hooks
@@ -279,8 +276,10 @@ export default {
279276 );
280277 }
281278
279+ // desktop is never considered for portrait mode
282280 function _isPortrait () {
283- return window .matchMedia (' (orientation: portrait)' ).matches ;
281+ const isDesktop = $q .platform .is .desktop ;
282+ return window .matchMedia (' (orientation: portrait)' ).matches && ! isDesktop;
284283 }
285284
286285 return {
You can’t perform that action at this time.
0 commit comments