From d6de9bb4295e2a70ad85bc9fd9ce6e6587330047 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Tue, 19 Jan 2016 11:52:13 -0500 Subject: #129 updates Former-commit-id: 98196e7cb08832f1f7eceaa36e2ec3da63fe6a79 --- www/js/TimelineCtrl.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'www/js/TimelineCtrl.js') 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); -- cgit v1.2.3