diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2020-03-06 10:31:50 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2020-03-06 10:31:50 -0500 |
| commit | b4dc33d7c203c0b85bad526aad0b4f36d30d794c (patch) | |
| tree | 5912c07170c3c6c57c90842968044ffeac988ca6 /www | |
| parent | 14f8eefe7e7d1157b47019f3ccd5ebb5bf19dc28 (diff) | |
wait for monitors to load in montage
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MontageCtrl.js | 8 | ||||
| -rw-r--r-- | www/js/NVR.js | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index fa5494ee..2b0d6311 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -5,7 +5,7 @@ /* global cordova,StatusBar,angular,console,ionic,Packery, Draggabilly, imagesLoaded, ConnectSDK, moment */ angular.module('zmApp.controllers') - .controller('zmApp.MontageCtrl', ['$scope', '$rootScope', 'NVR', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', '$localstorage', '$translate', 'SecuredPopups', 'EventServer', function ($scope, $rootScope, NVR, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window, $localstorage, $translate, SecuredPopups, EventServer) { + .controller('zmApp.MontageCtrl', ['$scope', '$rootScope', 'NVR', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', '$localstorage', '$translate', 'SecuredPopups', 'EventServer', 'message', function ($scope, $rootScope, NVR, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window, $localstorage, $translate, SecuredPopups, EventServer, message) { //--------------------------------------------------------------------- // Controller main @@ -2232,12 +2232,14 @@ angular.module('zmApp.controllers') broadcastHandles = []; randToAvoidCacheMem = new Date().getTime(); - $scope.monitors = NVR.getMonitorsNow(); + + $scope.monitors = message; + NVR.debug ('Montage beforeEnter: got '+message.length+' monitors'); //console.log ("MONITORS:"+JSON.stringify($scope.monitors)); $scope.MontageMonitors = angular.copy($scope.monitors); - + NVR.debug ('Montage beforeEnter: copying monitors to montage monitors'); $scope.singleMonitorModalOpen = false; diff --git a/www/js/NVR.js b/www/js/NVR.js index ef94d5b3..48745f99 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -2706,6 +2706,7 @@ angular.module('zmApp.controllers') // send the right list of monitors after registration // token getMonitorsNow: function () { + debug ('getMonitorsNow: returning '+monitors.length+' monitors'); return monitors; }, |
