client/annotviz/app/js/annotsvizview.js
changeset 141 e6892a30d454
parent 140 7e7e507444c3
child 144 1762372184ae
--- a/client/annotviz/app/js/annotsvizview.js	Fri Jan 23 15:37:57 2015 +0100
+++ b/client/annotviz/app/js/annotsvizview.js	Fri Jan 23 18:18:33 2015 +0100
@@ -32,25 +32,30 @@
     this.height= opts.height;
     this.timeBegin = opts.timeBegin;
     this.timeEnd = opts.timeEnd;
+
     this.annotCategories = [];
+    this.annotCategoriesDay2 = [];
     this.annotCategoriesDay1 = [];
 
     var wsPianoroll = opts.wsPianoroll;
     var wsAnnot = opts.wsAnnot;
     var stageView = opts.stageView;
     var currentTime = Date.now() + 3600*1000;
-    var eventCode = opts.eventCode;
-    var eventCodeSessionDay1 = opts.eventCodeSessionDay1;
     var channel = opts.channel;
     var serverUrl = opts.serverUrl;
+    
+    var eventCode = opts.eventCode;
+    var eventCodeSessionDay2 = opts.eventCodeSessionDay2;
+	var eventCodeSessionDay1 = opts.eventCodeSessionDay1;
 
-    Utils.getAnnotCategories(opts.urlCategories + eventCode, this.annotCategories);
+	Utils.getAnnotCategories(opts.urlCategories + eventCode, this.annotCategories);
+    Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay2, this.annotCategoriesDay2);
     Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay1, this.annotCategoriesDay1);
 
     stageView.registerComponent(this);
 
-    var timeLineDay2 = new AnnotsTimeLine.AnnotsTimeLine({
-        stageView : stageView,
+    var currentDay = new AnnotsTimeLine.AnnotsTimeLine({
+    	stageView : stageView,
         logger: logger,
         ws: wsAnnot,
         xInit: 0,
@@ -68,28 +73,51 @@
         serverUrl: serverUrl,
         annotCategories: this.annotCategories
     });
-
-    //Archive day 1
+	
+	//Archive day 2
+    var timeLineDay2 = new AnnotsTimeLine.AnnotsTimeLine({
+    	stageView : stageView,
+        xInit: 0,
+        yInit: 0,
+        width: 1024 - 200 - 200,
+        height: 768-200,
+        timeBegin: Date.parse("2015-01-23T09:30:00+01:00"),
+        timeEnd: Date.parse("2015-01-23T18:30:00+01:00"),
+        circleX: currentDay.circleX,
+        circleY: currentDay.circleY,
+        intervalWidth: (currentDay.radius*2/3)* currentDay.intervalWidth / currentDay.radius,
+        intervalHeight: (currentDay.intervalHeight * (currentDay.radius - currentDay.radius*2/3))/ currentDay.maxCellHeight,
+        maxCellHeight: (currentDay.radius - currentDay.radius*2/3)/2,
+        radius: currentDay.radius*2/3,
+        annotCategories: this.annotCategoriesDay2,
+        eventCode: eventCodeSessionDay2,
+        channel: channel,
+        serverUrl: serverUrl,
+        showClockGraphics:false,
+        archive: true
+    });
+	
+	//Archive day 1
     var timeLineDay1 = new AnnotsTimeLine.AnnotsTimeLine({
-        stageView : stageView,
-        archive: true,
+    	stageView : stageView,
         xInit: 0,
         yInit: 0,
         width: 1024 - 200 - 200,
         height: 768-200,
         timeBegin: Date.parse("2015-01-22T09:30:00+01:00"),
         timeEnd: Date.parse("2015-01-22T18:30:00+01:00"),
-        circleX: timeLineDay2.circleX,
-        circleY: timeLineDay2.circleY,
-        intervalWidth: (timeLineDay2.radius*2/3)* timeLineDay2.intervalWidth / timeLineDay2.radius,
-        intervalHeight: (timeLineDay2.intervalHeight * (timeLineDay2.radius - timeLineDay2.radius*2/3))/ timeLineDay2.maxCellHeight,
-        maxCellHeight: (timeLineDay2.radius - timeLineDay2.radius*2/3)/4,
-        radius: timeLineDay2.radius*2/3,
+        circleX: currentDay.circleX,
+        circleY: currentDay.circleY,
+        intervalWidth: (currentDay.radius*2/3)* currentDay.intervalWidth / currentDay.radius,
+        intervalHeight: (currentDay.intervalHeight * (currentDay.radius - currentDay.radius/3))/ currentDay.maxCellHeight,
+        maxCellHeight: (currentDay.radius*2/3 - currentDay.radius/3)/4,
+        radius: currentDay.radius/3,
         annotCategories: this.annotCategoriesDay1,
         eventCode: eventCodeSessionDay1,
         channel: channel,
         serverUrl: serverUrl,
-        showClockGraphics:false
+        showClockGraphics:false,
+        archive: true,
     });
 
     var currentTimeText = new PIXI.Text("-- : -- : --", { font: '18pt Gothic Standard', fill: '#646464' });
@@ -97,12 +125,6 @@
     currentTimeText.y = timeLineDay2.circleY - currentTimeText.height/2;
     this.container.addChild(currentTimeText);
 
-    var timeLineDay3 = new PIXI.Graphics();
-    timeLineDay3.lineStyle(1, 0x646464)
-        .drawCircle(timeLineDay2.circleX, timeLineDay2.circleY, timeLineDay2.radius/3)
-        .endFill()
-    this.container.addChild(timeLineDay3);
-
     var doubleRollH = new DoubleRoll.DoubleRoll({
         stageView : stageView,
         logger: logger,