summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-11-17 13:10:52 -0500
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-11-17 13:10:52 -0500
commitced7ea1ef0d12c050abd8d88ce39fa2fc4a1d84d (patch)
treed6771089f01d8d9c5403de2b9fc37e270c3a7d47 /www/js
parent5fa0e4fd15b3eb3c722a7e9c40e5105b503356ef (diff)
#88 - have a graphDesktopItemMax now to keep a max size even in desktops
Former-commit-id: 278c8e76b0f0119a917cb4994bb84f96133ddeaa
Diffstat (limited to 'www/js')
-rw-r--r--www/js/TimelineCtrl.js13
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;
}