diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-07 16:12:03 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-07 16:12:03 -0400 |
| commit | e86a3b8a9e1e6716b539adf010c528192c55dee1 (patch) | |
| tree | fc5c00c9da981c9d79b76968d9dd00a046d90599 | |
| parent | a425c4c91b9adcf3278717779dfc35d5b6ae0c16 (diff) | |
more packery tweaks
Former-commit-id: 2604ad30c9bfffdb19cad98b39f40abd330c0e89
| -rw-r--r-- | www/js/MontageCtrl.js | 6 | ||||
| -rw-r--r-- | www/js/MontageHistoryCtrl.js | 3 | ||||
| -rw-r--r-- | www/templates/montage.html | 10 |
3 files changed, 12 insertions, 7 deletions
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 diff --git a/www/templates/montage.html b/www/templates/montage.html index b442f998..9e859e3e 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -63,11 +63,11 @@ - <div class="grid-item grid-item-{{monitor.Monitor.gridScale}} " data-item-id="{{monitor.Monitor.Id}}" data-item-size="{{monitor.Monitor.gridScale}}" data-item-listdisplay="{{monitor.Monitor.listDisplay}}" > + <div class="grid-item grid-item-{{monitor.Monitor.gridScale}} " data-item-id="{{monitor.Monitor.Id}}" data-item-size="{{monitor.Monitor.gridScale}}" data-item-listdisplay="{{monitor.Monitor.listDisplay}} " > - <figure height="{{Monitor.monitor.height}}" width="{{Monitor.monitor.width}}" class="{{dragBorder}}" ng-show=" monitor.Monitor.listDisplay!='noshow'"> + <figure class="{{dragBorder}}" ng-show=" monitor.Monitor.listDisplay!='noshow'"> <!--<div ng-if="!isModalActive" >--> <div ng-if="$root.authSession!='undefined' && !isBackground() && !areImagesLoading"> <div ng-if = "!minimal"> @@ -79,12 +79,13 @@ </div> <div ng-if = "minimal"> - <img id="{{img-$index}}" image-spinner-src="{{monitor.Monitor.streamingURL}}/zms?mode=single&monitor={{monitor.Monitor.Id}}&scale={{LoginData.montageQuality}}{{$root.authSession}}&rand={{$root.rand}}" ng-click="!isDragabillyOn?openModal(monitor.Monitor.Id, monitor.Monitor.Controllable, monitor.Monitor.ControlId, monitor.Monitor.connKey,monitor):toggleSelectItem($index);" image-spinner-loader="lines" /> + <img id="img-{{$index}}" image-spinner-src="{{monitor.Monitor.streamingURL}}/zms?mode=single&monitor={{monitor.Monitor.Id}}&scale={{LoginData.montageQuality}}{{$root.authSession}}&rand={{$root.rand}}" ng-click="!isDragabillyOn?openModal(monitor.Monitor.Id, monitor.Monitor.Controllable, monitor.Monitor.ControlId, monitor.Monitor.connKey,monitor):toggleSelectItem($index);" image-spinner-loader="lines" /> </div> </div> <div ng-if="!$root.authSession=='undefined' || isBackground() || areImagesLoading"> - <img img id="{{img-$index}}" image-spinner-src="img/pausevideo.png" /> + + <img id="img-{{$index}}" image-spinner-src="img/pausevideo.png" /> </div> @@ -106,6 +107,7 @@ </div>--> </figure> + </div> </span> <!-- ngrepeat --> </div> |
