@hkdigital/lib-core 0.5.35 → 0.5.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -241,19 +241,23 @@
|
|
|
241
241
|
function updateIosWidthHeight() {
|
|
242
242
|
if (isPwa && isAppleMobile) {
|
|
243
243
|
// const angle = screen.orientation.angle;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
case "portrait-secondary":
|
|
250
|
-
isLandscape = false;
|
|
251
|
-
break;
|
|
252
|
-
default:
|
|
253
|
-
isLandscape = true;
|
|
254
|
-
break;
|
|
244
|
+
if( window.matchMedia('(orientation: portrait)').matches ) {
|
|
245
|
+
isLandscape = false;
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
isLandscape = true;
|
|
255
249
|
}
|
|
256
250
|
|
|
251
|
+
// switch( screen.orientation.type ) {
|
|
252
|
+
// case "portrait-primary":
|
|
253
|
+
// case "portrait-secondary":
|
|
254
|
+
// isLandscape = false;
|
|
255
|
+
// break;
|
|
256
|
+
// default:
|
|
257
|
+
// isLandscape = true;
|
|
258
|
+
// break;
|
|
259
|
+
// }
|
|
260
|
+
|
|
257
261
|
// Use window.inner dimensions instead of screen dimensions
|
|
258
262
|
// because screen.width/height don't rotate on iOS PWA
|
|
259
263
|
// if (isLandscape) {
|