diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-05-06 14:50:15 -0400 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-05-06 14:50:15 -0400 |
| commit | a5f4780cf4aece0daa211275cd5a7c9acf6ef708 (patch) | |
| tree | fd4b867062ded3a96ecbd9f33c80fa469f45c09a /www/js/MontageCtrl.js | |
| parent | a902f47149def68b7c7c4e9d65d8697970d4a643 (diff) | |
#241 - seems to be working for the most part
Former-commit-id: 975a7a737d99859ad75e643c93ec28e790935572
Diffstat (limited to 'www/js/MontageCtrl.js')
| -rw-r--r-- | www/js/MontageCtrl.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 0b522eed..3c57d1cf 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -26,6 +26,8 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' var pckry, draggie; var draggies; $scope.isDragabillyOn = false; + $scope.allImagesLoaded = false; + $scope.gridScale = "grid-item-30"; @@ -263,6 +265,7 @@ function initPackery() imagesLoaded(elem).on('always', function() { //console.log ("******** ALL IMAGES LOADED"); ZMDataModel.zmDebug ("All images loaded"); + $scope.allImagesLoaded = true; $ionicLoading.hide(); @@ -345,7 +348,13 @@ function initPackery() } function loadNotifications() { - + + if (!$scope.allImagesLoaded) + { + ZMDataModel.zmDebug ("skipping image refresh, packery is still loading"); + return; + } + $rootScope.rand = Math.floor((Math.random() * 100000) + 1); //console.log ("Inside Montage timer..."); @@ -353,7 +362,7 @@ function initPackery() } $scope.cancelReorder = function() - { + { $scope.modal.remove(); }; @@ -877,7 +886,11 @@ function initPackery() ZMDataModel.zmDebug ("Detected orientation change, redoing packery resize"); $timeout(function(){pckry.onresize();}); } - + + $scope.$on('$ionicView.beforeEnter', function () { + ZMDataModel.zmDebug ("Setting image mode to snapshot, will change to image when packery is all done"); + $scope.allImagesLoaded = false; + }); $scope.$on('$ionicView.beforeLeave', function () { // console.log("**VIEW ** Montage Ctrl Left, force removing modal"); |
