Add 1 hour to annot timsetamp to catch up the current time
authorrougeronj
Thu, 22 Jan 2015 10:30:36 +0100
changeset 114 9fcb0e0991ed
parent 113 7531e4180915
child 115 14da5aeab8d9
child 117 c0034b35c44e
Add 1 hour to annot timsetamp to catch up the current time
client/annotviz/app/js/annotstimeline.js
--- a/client/annotviz/app/js/annotstimeline.js	Thu Jan 22 10:01:59 2015 +0100
+++ b/client/annotviz/app/js/annotstimeline.js	Thu Jan 22 10:30:36 2015 +0100
@@ -99,8 +99,12 @@
     	var annotTime = Date.parse(data.ts);
 
     	if (this.timeEnd > Date.parse(data.ts)){
-	    	var i = Math.floor((Date.parse(data.ts)-this.timeBegin)/(1000*this.intervalDuration));
-
+    		console.log(this.timeBegin);
+    		console.log(data.ts);
+    		console.log(Date.parse(data.ts));
+    		console.log(Date.now());
+	    	var i = Math.floor(((Date.parse(data.ts) + 3600*1000) - this.timeBegin)/(1000*this.intervalDuration));
+	    	console.log(i);
 			this.cells[i].categories[annotCode].count += 1;
 			this.cells[i].totalAnnots +=1;
 			this.redrawCell(this.cells[i], i);