From e86a3b8a9e1e6716b539adf010c528192c55dee1 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 7 Oct 2016 16:12:03 -0400 Subject: more packery tweaks Former-commit-id: 2604ad30c9bfffdb19cad98b39f40abd330c0e89 --- www/js/MontageCtrl.js | 6 ++++-- www/js/MontageHistoryCtrl.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'www/js') diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 38e1d1a0..64ee0891 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -184,6 +184,7 @@ angular.module('zmApp.controllers') NVRDataModel.log("*** BUG PROGRESS WAS NOT CALLED"); } NVRDataModel.debug("All images loaded, doing image layout"); + $scope.areImagesLoading = false; // outside timeout so images show before next line $timeout(function () { pckry.initShiftLayout(positions, 'data-item-id'); //pckry.reloadItems(); @@ -219,7 +220,8 @@ angular.module('zmApp.controllers') } - $scope.allImagesLoaded = true; + + $timeout (function () { pckry.layout();},300); @@ -887,7 +889,7 @@ angular.module('zmApp.controllers') $ionicSideMenuDelegate.canDragContent($scope.minimal ? true : true); - //$scope.areImagesLoading = true; + $scope.areImagesLoading = true; var ld = NVRDataModel.getLogin(); refreshSec = (NVRDataModel.getBandwidth()=='lowbw') ? ld.refreshSecLowBW : ld.refreshSec; diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index 897572b9..abe1f984 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -1141,10 +1141,11 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc pckry.initShiftLayout(positions, 'eh-data-item-id'); }, 0);*/ } + $scope.allImagesLoaded = true; $timeout(function () { NVRDataModel.log("Force calling resize"); pckry.layout(); - $scope.allImagesLoaded = true; + }, zm.packeryTimer); // don't ask -- cgit v1.2.3