clean code
authorymh <ymh.work@gmail.com>
Mon, 26 Jan 2015 01:36:56 +0100
changeset 144 1762372184ae
parent 143 95104e98d78d
child 145 a8052f8ab19c
clean code
client/annotviz/app/js/annotstimeline.js
client/annotviz/app/js/annotsvizview.js
--- a/client/annotviz/app/js/annotstimeline.js	Fri Jan 23 23:21:01 2015 +0100
+++ b/client/annotviz/app/js/annotstimeline.js	Mon Jan 26 01:36:56 2015 +0100
@@ -88,9 +88,6 @@
         var startTs = _this.timeBegin;
         var endTs = Math.min(_this.timeEnd,_this.startTs);
 
-        console.log("START TS",new Date(startTs).toISOString());
-        console.log("END TS",new Date(endTs).toISOString());
-
         var url = serverUrl + '/p/api/v1/annotation';
         var filters = [
             { name: 'ts', op: '>', val: new Date(startTs).toISOString()}, //start
--- a/client/annotviz/app/js/annotsvizview.js	Fri Jan 23 23:21:01 2015 +0100
+++ b/client/annotviz/app/js/annotsvizview.js	Mon Jan 26 01:36:56 2015 +0100
@@ -3,7 +3,9 @@
 *
 * This is the starting point for your application.
 * Take a look at http://browserify.org/ for more info
+*
 */
+/*jshint unused: false */
 
 'use strict';
 
@@ -40,13 +42,13 @@
     var wsPianoroll = opts.wsPianoroll;
     var wsAnnot = opts.wsAnnot;
     var stageView = opts.stageView;
-    var currentTime = Date.now() + 3600*1000;
     var channel = opts.channel;
     var serverUrl = opts.serverUrl;
-    
+
     var eventCode = opts.eventCode;
     var eventCodeSessionDay2 = opts.eventCodeSessionDay2;
 	var eventCodeSessionDay1 = opts.eventCodeSessionDay1;
+    var logger = opts.logger;
 
 	Utils.getAnnotCategories(opts.urlCategories + eventCode, this.annotCategories);
     Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay2, this.annotCategoriesDay2);
@@ -73,7 +75,7 @@
         serverUrl: serverUrl,
         annotCategories: this.annotCategories
     });
-	
+
 	//Archive day 2
     var timeLineDay2 = new AnnotsTimeLine.AnnotsTimeLine({
     	stageView : stageView,
@@ -81,8 +83,8 @@
         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"),
+        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,
@@ -96,7 +98,7 @@
         showClockGraphics:false,
         archive: true
     });
-	
+
 	//Archive day 1
     var timeLineDay1 = new AnnotsTimeLine.AnnotsTimeLine({
     	stageView : stageView,
@@ -104,8 +106,8 @@
         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"),
+        timeBegin: Date.parse('2015-01-22T09:30:00+01:00'),
+        timeEnd: Date.parse('2015-01-22T18:30:00+01:00'),
         circleX: currentDay.circleX,
         circleY: currentDay.circleY,
         intervalWidth: (currentDay.radius*2/3)* currentDay.intervalWidth / currentDay.radius,
@@ -120,11 +122,12 @@
         archive: true,
     });
 
-    var currentTimeText = new PIXI.Text("-- : -- : --", { font: '18pt Gothic Standard', fill: '#646464' });
+    var currentTimeText = new PIXI.Text('-- : -- : --', { font: '18pt Gothic Standard', fill: '#646464' });
     currentTimeText.x = timeLineDay2.circleX - currentTimeText.width/2;
     currentTimeText.y = timeLineDay2.circleY - currentTimeText.height/2;
     this.container.addChild(currentTimeText);
 
+
     var doubleRollH = new DoubleRoll.DoubleRoll({
         stageView : stageView,
         logger: logger,