client/annotviz/app/js/annotstimeline.js
changeset 98 72d767c5142d
parent 97 545803e685e0
child 100 0d7dac03c1a0
--- a/client/annotviz/app/js/annotstimeline.js	Mon Jan 19 16:44:59 2015 +0100
+++ b/client/annotviz/app/js/annotstimeline.js	Tue Jan 20 11:57:44 2015 +0100
@@ -1,18 +1,17 @@
 /**
-* js/generalView
+* js/annotsTimeline
 *
-* generalView basic component
+* annotsTimeline basic component
 *
 */
 
 'use strict';
 
 var PIXI = require('pixi');
-var randomColor = require('randomColor');
 
-function GeneralView(parentContainer, xInit, yInit, width, height, timeBegin, timeEnd, intervalSize){
-	console.log(width);
-    var _this = this;
+function AnnotsTimeline(parentContainer, xInit, yInit, width, height, timeBegin, timeEnd, intervalSize){
+
+//    var _this = this;
     this.container = new PIXI.DisplayObjectContainer();
     this.container.position.x = xInit;
     this.container.position.y = yInit;
@@ -22,7 +21,7 @@
 
     this.timeBegin = timeBegin;
     this.timeEnd = timeEnd;
-    this.duration = (timeEnd - timeBegin)/1000
+    this.duration = (timeEnd - timeBegin)/1000;
     this.width = width;
     this.height = height;
     //define interval corresponding to the time of one step
@@ -33,7 +32,7 @@
 
   //Initialise the list of step
     //each cell will contain the list categories and the number of annotations per categories
-    this.cells = []
+    this.cells = [];
 
 
     // draw temp line to locate the middle of the container
@@ -62,7 +61,7 @@
 //    		if (c)
 //    	}
 
-    	console.log("x : " + x + " | y : " + y);
+    	console.log('x : ' + x + ' | y : ' + y);
 
     	// We draw the rectangle
         var graphics = new PIXI.Graphics();
@@ -75,4 +74,6 @@
 
 }
 
-module.exports = GeneralView;
+module.exports = {
+	AnnotsTimeline : AnnotsTimeline
+};