diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-03-14 09:14:49 -0400 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-03-14 09:14:49 -0400 |
| commit | 1449da8cd68bb4a3d3ccbc9e24a2caf8bf7d843a (patch) | |
| tree | 0cebb039fa02b9285f5e5a554dd9c9d8f60867d1 | |
| parent | 1a568c93465cf69f994ca5f956d83d1d5c01a4f8 (diff) | |
#194 - ignore hidden or disabled monitors in count
Former-commit-id: 3b932e79ac952cb26eb0cceec460d092746afa22
| -rw-r--r-- | www/js/MontageCtrl.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index b02cbe6b..8feb8ba1 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -211,9 +211,19 @@ function initPackery() layouttype = false; } - if ($scope.MontageMonitors.length != positions.length) + + var cnt=0; + $scope.MontageMonitors.forEach(function(elem) + { + if ((elem.Monitor.Elabled!='0') && (elem.Monitor.Function!='None')) + cnt++; + }); + + ZMDataModel.zmLog ("Monitors that are active: " + cnt + " while grid has " + positions.length); + + if (cnt!= positions.length) { - ZMDataModel.zmLog ("Monitors found:"+$scope.MontageMonitors.length+" but layout says:"+positions.length); + ZMDataModel.zmLog ("Whoops!! Monitors have changed. I'm resetting layouts, sorry!"); layouttype = true; positions = {}; |
