From 89969cf4d6dc308f68efc44d493f9a4a236a24cd Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Tue, 22 Dec 2015 11:21:18 -0500 Subject: #119 - fixes to pack in montage - still some odd header behavior but better than what exists now Former-commit-id: 869cab572aa43f457848bf0b4beab312cb17b6d3 --- www/js/DataModel.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'www/js/DataModel.js') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 497cc4b5..6d2bd45a 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -20,7 +20,7 @@ angular.module('zmApp.controllers') var zmAppVersion="unknown"; var isBackground = false; var monitorsLoaded = 0; - var montageSize = 3; + //var montageSize = 3; var monitors = []; var oldevents = []; @@ -57,8 +57,10 @@ angular.module('zmApp.controllers') 'montageOrder':'', 'montageHiddenOrder':'', 'montageArraySize':'0', + 'graphSize':200, 'minAlarmCount':'1', + 'montageSize':'10', }; @@ -211,6 +213,14 @@ angular.module('zmApp.controllers') loginData.minAlarmCount = '1'; } + + if (typeof loginData.montageSize == 'undefined') + { + zmDebug ("montageSize does not exist, setting to 18 (2 per col)"); + loginData.montageSize = 18; + } + + zmLog ("DataModel init recovered this loginData as " + JSON.stringify(loginData)); } else @@ -929,14 +939,14 @@ angular.module('zmApp.controllers') // //----------------------------------------------------------------------------- getMontageSize: function () { - return montageSize; + return loginData.montageSize; }, //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- setMontageSize: function (montage) { - montageSize = montage; + loginData.montageSize = montage; }, -- cgit v1.2.3