@hkdigital/lib-core 0.5.36 → 0.5.37
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,14 +240,17 @@
|
|
|
240
240
|
|
|
241
241
|
function updateIosWidthHeight() {
|
|
242
242
|
if (isPwa && isAppleMobile) {
|
|
243
|
+
|
|
244
|
+
// unreliable on ios >>
|
|
243
245
|
// const angle = screen.orientation.angle;
|
|
244
|
-
if( window.matchMedia('(orientation: portrait)').matches ) {
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
|
|
249
|
-
}
|
|
246
|
+
// if( window.matchMedia('(orientation: portrait)').matches ) {
|
|
247
|
+
// isLandscape = false;
|
|
248
|
+
// }
|
|
249
|
+
// else {
|
|
250
|
+
// isLandscape = true;
|
|
251
|
+
// }
|
|
250
252
|
|
|
253
|
+
// unreliable on ios >>
|
|
251
254
|
// switch( screen.orientation.type ) {
|
|
252
255
|
// case "portrait-primary":
|
|
253
256
|
// case "portrait-secondary":
|
|
@@ -271,6 +274,14 @@
|
|
|
271
274
|
iosWindowWidth = window.innerWidth;
|
|
272
275
|
iosWindowHeight = window.innerHeight;
|
|
273
276
|
|
|
277
|
+
if( iosWindowHeight > iosWindowWidth )
|
|
278
|
+
{
|
|
279
|
+
isLandscape = false;
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
isLandscape = true;
|
|
283
|
+
}
|
|
284
|
+
|
|
274
285
|
if( debug )
|
|
275
286
|
{
|
|
276
287
|
console.debug('updateIosWidthHeight', {
|