# HG changeset patch # User rougeronj # Date 1421917319 -3600 # Node ID 7531e4180915d8760a5569690ced87981c19a9f9 # Parent 3e075a48e19e81cef606849d0e14aa6798a57879 Minor time correction diff -r 3e075a48e19e -r 7531e4180915 annot-server/webapp/templates/annotviz.html --- a/annot-server/webapp/templates/annotviz.html Thu Jan 22 09:29:49 2015 +0100 +++ b/annot-server/webapp/templates/annotviz.html Thu Jan 22 10:01:59 2015 +0100 @@ -97,7 +97,9 @@ stageView: stageView, wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger), wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger), - annotCategories: annotCategories + annotCategories: annotCategories, + timeBegin: 1421919000000, + timeEnd: 1421951400000 }); diff -r 3e075a48e19e -r 7531e4180915 client/annotviz/app/annotsvizview.html --- a/client/annotviz/app/annotsvizview.html Thu Jan 22 09:29:49 2015 +0100 +++ b/client/annotviz/app/annotsvizview.html Thu Jan 22 10:01:59 2015 +0100 @@ -95,6 +95,8 @@ stageView: stageView, wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger), wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger), + timeBegin: 1421919000000, + timeEnd: 1421951400000 }); 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; diff -r 3e075a48e19e -r 7531e4180915 client/annotviz/app/js/annotsvizview.js --- a/client/annotviz/app/js/annotsvizview.js Thu Jan 22 09:29:49 2015 +0100 +++ b/client/annotviz/app/js/annotsvizview.js Thu Jan 22 10:01:59 2015 +0100 @@ -47,6 +47,8 @@ this.width = opts.width; this.height= opts.height; this.annotCategories = opts.annotCategories; + this.timeBegin = opts.timeBegin; + this.timeEnd = opts.timeEnd; var wsPianoroll = opts.wsPianoroll; var wsAnnot = opts.wsAnnot; @@ -62,8 +64,8 @@ yInit: 0, width: 1024 - 200 - 200, height: 768-200, - timeBegin: Date.now(), - timeEnd: Date.now() + 3000000, + timeBegin: this.timeBegin, + timeEnd: this.timeEnd, intervalWidth: 6, intervalHeight: 10, maxCellHeight: 70,