diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2016-01-19 11:52:13 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2016-01-19 11:52:13 -0500 |
| commit | d6de9bb4295e2a70ad85bc9fd9ce6e6587330047 (patch) | |
| tree | ad75198cc30ddd826fda22ba844bc6b1894b016b /www/js/TimelineCtrl.js | |
| parent | ee0e220a8131075dff46a6e82525f2e73b12757d (diff) | |
#129 updates
Former-commit-id: 98196e7cb08832f1f7eceaa36e2ec3da63fe6a79
Diffstat (limited to 'www/js/TimelineCtrl.js')
| -rw-r--r-- | www/js/TimelineCtrl.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index 803dc87c..f12cb077 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -311,9 +311,10 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla console.log("*********************** TIMELINE MAIN "); // maxItems will be ignored during timeline draw if its desktop - // var maxItems = ($rootScope.platformOS == 'desktop') ? zm.graphDesktopItemMax: zm.graphItemMax; + var maxItemsConf = ($rootScope.platformOS == 'desktop') ? zm.graphDesktopItemMax: zm.graphItemMax; + var ld = ZMDataModel.getLogin(); - var maxItems = ld.graphSize || 200; + var maxItems = ld.graphSize || maxItemsConf; ZMDataModel.zmLog("Graph items to draw is " + maxItems); $scope.maxItems = maxItems; @@ -493,11 +494,6 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla var itemsPerPage = parseInt(data.limit); var iterCount; - // The graph seems to get very slow - // even with 200 items. My data comes in pages from - // the server - so to make sure I don't exceed 200 items - // I figure out how many items the server returns per API page - // and divide the # of items I want (currently 200) with # of items per page // So iterCount is the # of HTTP calls I need to make iterCount = Math.max(Math.round(count / itemsPerPage), 1); ZMDataModel.zmDebug("TimelineCtrl/drawGraph: pages of data: " + pages + " items per page: " + itemsPerPage); |
