diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-17 11:11:31 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-17 11:11:31 -0400 |
| commit | 73230565af35e1830fb7faf0f8cf365b5ec0e3b5 (patch) | |
| tree | 426a4b5ab0e68b0793cc262c58ccf006ae861dcb /www/js/MontageCtrl.js | |
| parent | 654c8b574639bdf026e756a5bc0afadb287a2138 (diff) | |
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
Diffstat (limited to 'www/js/MontageCtrl.js')
| -rw-r--r-- | www/js/MontageCtrl.js | 14 |
1 files changed, 11 insertions, 3 deletions
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); |
