summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/js/TimelineCtrl.js13
-rw-r--r--www/templates/timeline.html3
2 files changed, 8 insertions, 8 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;
}
diff --git a/www/templates/timeline.html b/www/templates/timeline.html
index 71071098..7ac71513 100644
--- a/www/templates/timeline.html
+++ b/www/templates/timeline.html
@@ -26,8 +26,7 @@
<ion-content>
<div style="padding-left:15px; font-size:10px; color:grey">
- {{prettify(fromDate)}} - {{prettify(toDate)}}
- <span ng-show="$root.platformOS!='desktop'">(only displaying last {{maxItems}} events)</span>
+ {{prettify(fromDate)}} - {{prettify(toDate)}} (only displaying last {{maxItems}} events)
</div>
<div ng-if="!graphLoaded">