@hkdigital/lib-core 0.5.34 → 0.5.35
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.
|
@@ -240,15 +240,23 @@
|
|
|
240
240
|
|
|
241
241
|
function updateIosWidthHeight() {
|
|
242
242
|
if (isPwa && isAppleMobile) {
|
|
243
|
-
const angle = screen.orientation.angle;
|
|
243
|
+
// const angle = screen.orientation.angle;
|
|
244
|
+
// if( window.matchMedia('(orientation: portrait)').matches ) {
|
|
245
|
+
// }
|
|
244
246
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
247
|
+
switch( screen.orientation.type ) {
|
|
248
|
+
case "portrait-primary":
|
|
249
|
+
case "portrait-secondary":
|
|
250
|
+
isLandscape = false;
|
|
251
|
+
break;
|
|
252
|
+
default:
|
|
253
|
+
isLandscape = true;
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
248
256
|
|
|
249
257
|
// Use window.inner dimensions instead of screen dimensions
|
|
250
258
|
// because screen.width/height don't rotate on iOS PWA
|
|
251
|
-
// if (
|
|
259
|
+
// if (isLandscape) {
|
|
252
260
|
// iosWindowWidth = window.innerHeight;
|
|
253
261
|
// iosWindowHeight = window.innerWidth;
|
|
254
262
|
// } else {
|
|
@@ -262,7 +270,7 @@
|
|
|
262
270
|
if( debug )
|
|
263
271
|
{
|
|
264
272
|
console.debug('updateIosWidthHeight', {
|
|
265
|
-
|
|
273
|
+
'screen.orientation.type': screen.orientation.type,
|
|
266
274
|
isLandscape,
|
|
267
275
|
'window.innerWidth': window.innerWidth,
|
|
268
276
|
'window.innerHeight': window.innerHeight,
|