File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 214214function getMapZoom<?php echo $ map_id2 ;?> (){
215215 if (window.outerWidth<=767) {
216216 var orientation = screen.orientation || screen.mozOrientation || screen.msOrientation || null;
217- var landscape = (typeof orientation === 'object' && typeof orientation.type === 'string') ? (orientation.type.indexOf("landscape") >= 0) : (Math.abs(Number(window.orientation)) === 90);
217+ var landscape = false;
218+ if (typeof orientation === 'object' && orientation && typeof orientation.type === 'string') {
219+ landscape = (orientation.type.indexOf("landscape") >= 0);
220+ }
221+ else {
222+ if (typeof window.orientation !== "undefined") {
223+ landscape = (Math.abs(Number(window.orientation)) === 90);
224+ }
225+ else
226+ landscape = (window.innerWidth > window.innerHeight);
227+ }
218228 if (landscape) {
219229 <?php if ($ settings ['debug_output ' ]) : ?>
220230 console.info('<?php echo '[ ' . $ info ['name ' ] . '] ' ;?> Detected Phone Landscape mode');
You can’t perform that action at this time.
0 commit comments