client/annotviz/app/js/doubleroll.js
changeset 153 60bd2b36b9dc
parent 152 f0e12afcfba1
--- a/client/annotviz/app/js/doubleroll.js	Thu Apr 16 11:09:46 2015 +0200
+++ b/client/annotviz/app/js/doubleroll.js	Thu Apr 16 12:15:33 2015 +0200
@@ -17,6 +17,7 @@
     orientation: 'horizontal',
     logger: undefined,
     sceneWidth: 1024,
+    showTimer: false,
     pianorolls : [
       {
         height: 384,
@@ -70,6 +71,7 @@
     this.framerate = opts.framerate;
     this.offsetMusic = opts.offsetMusic;
     this.noteColors = opts.noteColors;
+    this.showTimer = opts.showTimer;
 
     var noteHeight = opts.noteHeight;
     var sceneHeight = opts.sceneHeight || _(opts.pianorolls).reduce(function(s,p) { return s + p.height; }, 0);
@@ -80,6 +82,7 @@
     var sceneWidth = opts.sceneWidth;
     var stageView = opts.stageView;
 
+    
     var zeroShift = opts.zeroShift;
 
     var ws = opts.ws;
@@ -135,10 +138,12 @@
         }
     });
 
-    var currentTimeText = new PIXI.Text('-- : -- : --', { font: '40pt Arial', fill: '#646464' });
-    currentTimeText.x = -currentTimeText.width - 60; 
-    currentTimeText.y = sceneHeight - currentTimeText.height - 30;
-    this.container.addChild(currentTimeText);
+    if (this.showTimer){
+	    var currentTimeText = new PIXI.Text('-- : -- : --', { font: '40pt Arial', fill: '#646464' });
+	    currentTimeText.x = -currentTimeText.width - 60; 
+	    currentTimeText.y = sceneHeight - currentTimeText.height - 30;
+	    this.container.addChild(currentTimeText);
+	}
     
     
     if(!isHorizontal) {
@@ -178,7 +183,9 @@
     var refreshTimeInterval;
 
     this.start = function() {
-    	refreshTimeInterval = setInterval(function() {_this.updateTime();}, 1000);
+    	if (this.showTimer){
+    		refreshTimeInterval = setInterval(function() {_this.updateTime();}, 1000);
+    	}
     	
         startTs = Date.now();
         pianorollList.forEach(function(c) {