diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-20 17:28:35 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-20 17:28:35 -0500 |
| commit | 3199652694d304b17dcc787d473f5efaa64b9cb3 (patch) | |
| tree | 4cfc77e0094c67ca080cdfaefc5af1285efc9e2a /www | |
| parent | bf239e006e52349861a62dab2e2cdf2c5c484f58 (diff) | |
#104 - handle less than items per page count
Former-commit-id: add9fb5776836feb551e013c676a3eed4ff7a66f
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/TimelineCtrl.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index 7f100ff5..048fc03e 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -466,7 +466,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla // 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.round(count / itemsPerPage); + iterCount = Math.max(Math.round(count / itemsPerPage),1); ZMDataModel.zmDebug("TimelineCtrl/drawGraph: pages of data: " + pages + " items per page: " + itemsPerPage); ZMDataModel.zmDebug("TimelineCtrl/drawGraph: I will make " + iterCount + " HTTP Requests to get all graph data"); |
