diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-17 13:10:52 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-17 13:10:52 -0500 |
| commit | ced7ea1ef0d12c050abd8d88ce39fa2fc4a1d84d (patch) | |
| tree | d6771089f01d8d9c5403de2b9fc37e270c3a7d47 /www/js/TimelineCtrl.js | |
| parent | 5fa0e4fd15b3eb3c722a7e9c40e5105b503356ef (diff) | |
#88 - have a graphDesktopItemMax now to keep a max size even in desktops
Former-commit-id: 278c8e76b0f0119a917cb4994bb84f96133ddeaa
Diffstat (limited to 'www/js/TimelineCtrl.js')
| -rw-r--r-- | www/js/TimelineCtrl.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index 1a7faae6..09c7bc90 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -7,7 +7,7 @@ // This controller creates a timeline // It uses the visjs library, but due to performance reasons // I've disabled pan and zoom and used buttons instead -// also limits # of items to maxItems (currently 200) +// also limits # of items to maxItems // FIXME: too much redundant code between EventCtrl and Timeline @@ -277,7 +277,8 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla console.log ("*********************** TIMELINE MAIN "); // maxItems will be ignored during timeline draw if its desktop - var maxItems = zm.graphItemMax; // THAT magic # --> 300 and ZM on my m/c cries + var maxItems = ($rootScope.platformOS == 'desktop') ? zm.graphDesktopItemMax: zm.graphItemMax; + $scope.maxItems = maxItems; $scope.graphLoaded = false; ZMDataModel.zmDebug("TimelineCtrl/drawGraph: graphLoaded is " + $scope.graphLoaded); @@ -497,8 +498,8 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla for (var j = 0; j < data.length; j++) { var myevents = data[j]; - if (graphIndex > zm.graphItemMax && $rootScope.platformOS != "desktop") { - ZMDataModel.zmLog("Exiting page count graph - reached limit of " + zm.graphItemMax); + if (graphIndex > count) { + ZMDataModel.zmLog("Exiting page count graph - reached limit of " + count); break; } @@ -556,8 +557,8 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla - if (graphIndex > zm.graphItemMax && $rootScope.platformOS != "desktop") { - ZMDataModel.zmLog("Exiting event graph - reached limit of " + zm.graphItemMax); + if (graphIndex > count) { + ZMDataModel.zmLog("Exiting event graph - reached limit of " + count); break; } |
