summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2020-10-26 14:22:39 -0400
committerPliable Pixels <pliablepixels@gmail.com>2020-10-26 14:22:39 -0400
commit1c76c86d61037233f333ab7ef4e09883f87443c8 (patch)
treea0e83c48849af9017f1783085615a0b4d93d2cfe /www/js
parentb24af50d5ddec77fc823434f9d5e8fe4caad20d1 (diff)
fix screen orientation (shows as undefined)
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventCtrl.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index ea741a6d..56691f69 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -94,12 +94,13 @@ angular.module('zmApp.controllers')
recomputeRowHeights();
$ionicScrollDelegate.resize();
- NVR.debug("screen.orientation.type: " + screen.orientation.type);
- if (currOrientation != screen.orientation.type) {
+ var orientation = (screen.orientation || {}).type || screen.mozOrientation || screen.msOrientation;
+ NVR.debug("orientation: " + orientation);
+ if (currOrientation != orientation) {
//$scope.$apply();
NVR.debug("sizechanged, scroll to item: " + currEventNum + ", postion: " + currEventPos);
scrollTo(currEventNum, currEventPos);
- currOrientation = screen.orientation.type;
+ currOrientation = orientation;
} else {
$timeout (function() {
navTitle();