diff -r 3e075a48e19e -r 7531e4180915 client/annotviz/app/js/annotstimeline.js --- a/client/annotviz/app/js/annotstimeline.js Thu Jan 22 09:29:49 2015 +0100 +++ b/client/annotviz/app/js/annotstimeline.js Thu Jan 22 10:01:59 2015 +0100 @@ -46,7 +46,7 @@ this.perimeter = 2*Math.PI* this.radius; this.intervalDuration = (this.intervalWidth * this.duration / this.perimeter); - var currentTime = this.timeBegin; + var currentTime = Date.now() + 3600*1000; var totalIndex = Math.floor(this.perimeter/this.intervalWidth); this.cells = [] @@ -55,7 +55,7 @@ this.cells[i].i = i; this.cells[i].totalAnnots = 0; this.cells[i].categories = {}; - + for (var category in this.annotCategories[0].colors){ this.cells[i].categories[category] = { "count": 0, @@ -107,7 +107,7 @@ } }; - this.initGraphics = function(cell){ + this.initCell = function(cell){ cell.graphics = new PIXI.Graphics(); cell.graphics.position.x = this.circleX + this.radius * Math.sin(cell.i*(360/totalIndex)*(Math.PI/180)); cell.graphics.position.y = this.circleY - this.radius * Math.cos(cell.i*(360/totalIndex)*(Math.PI/180)); @@ -148,7 +148,7 @@ this.redrawCell = function(cell){ if (typeof(cell.graphics) === 'undefined'){ - this.initGraphics(cell); + this.initCell(cell); } else { cell.graphics.clear(); } @@ -181,7 +181,7 @@ }; this.updateTime = function(){ - currentTime += 1000; + currentTime = Date.now() + 3600*1000; var nbSec = currentTime / 1000; var hours = Math.floor( nbSec / 3600 ) % 24;