optimisation, again.
authorcavaliet
Tue, 21 Oct 2014 12:14:05 +0200
changeset 50 5ff6273e3626
parent 49 5c1702e8d2a4
child 51 7792f095d94a
optimisation, again.
annot-server/static/js/pianoroll.js
--- a/annot-server/static/js/pianoroll.js	Tue Oct 21 11:29:55 2014 +0200
+++ b/annot-server/static/js/pianoroll.js	Tue Oct 21 12:14:05 2014 +0200
@@ -221,7 +221,8 @@
 function addLine(){
     nbLines++;
     var graphics = new PIXI.Graphics();
-    var x = nbLines * (lineInterval/1000) * pixelsPerSecond1;
+    //var x = nbLines * (lineInterval/1000) * pixelsPerSecond1;
+    var x = -container1.x;
     //console.log("nbLines = ",nbLines, "x = ", x);
     graphics.beginFill(0xFFFF00);
     graphics.lineStyle(1, lineColor);
@@ -242,7 +243,8 @@
     container1.addChild(t);
     // Second container
     graphics = new PIXI.Graphics();
-    x = nbLines * (lineInterval/1000) * pixelsPerSecond2;
+    //x = nbLines * (lineInterval/1000) * pixelsPerSecond2;
+    x = -container2.x;
     graphics.beginFill(0xFFFF00);
     graphics.lineStyle(1, lineColor);
     graphics.moveTo(x, 0);