From 73230565af35e1830fb7faf0f8cf365b5ec0e3b5 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 17 Oct 2016 11:11:31 -0400 Subject: more tweaks for #350 - removed the image pause divs - initied packery only after auth token is received - imagesLoaded seems to be correct now Former-commit-id: 9730031f045c8aae1d7a65d4da0b04e32a177ecc --- www/js/MontageCtrl.js | 14 +++++++++++--- www/templates/montage.html | 15 +++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) (limited to 'www') diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 6675c4eb..aa218c90 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -161,6 +161,8 @@ angular.module('zmApp.controllers') imagesLoaded(elem).on('progress', function (instance, img) { + var result = img.isLoaded ? 'loaded' : 'broken'; + NVRDataModel.debug( '~~loaded image is ' + result + ' for ' + img.img.src ); progressCalled = true; @@ -171,7 +173,9 @@ angular.module('zmApp.controllers') //console.log ("******** ALL IMAGES LOADED"); // $scope.$digest(); NVRDataModel.debug("All images loaded"); + $scope.areImagesLoading = false; + $ionicLoading.hide(); @@ -975,6 +979,9 @@ angular.module('zmApp.controllers') $rootScope.authSession = success; NVRDataModel.log("Stream authentication construction: " + $rootScope.authSession); + $timeout(function () { + initPackery(); + }, zm.packeryTimer); }, function (error) { @@ -983,13 +990,14 @@ angular.module('zmApp.controllers') NVRDataModel.debug("MontageCtrl: Error in authkey retrieval " + error); //$rootScope.authSession=""; NVRDataModel.log("MontageCtrl: Error returned Stream authentication construction. Retaining old value of: " + $rootScope.authSession); + $timeout(function () { + initPackery(); + }, zm.packeryTimer); }); //console.log("**VIEW ** Montage Ctrl AFTER ENTER"); window.addEventListener("resize", orientationChanged, false); - $timeout(function () { - initPackery(); - }, zm.packeryTimer); + document.addEventListener("pause", onPause, false); document.addEventListener("resume", onResume, false); diff --git a/www/templates/montage.html b/www/templates/montage.html index ef7a4224..18280cab 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -66,18 +66,19 @@ -
+
-
+
-
+ +
- +
@@ -86,10 +87,12 @@
-
+ -- cgit v1.2.3