# HG changeset patch # User cavaliet # Date 1413886445 -7200 # Node ID 5ff6273e3626391441a7607d00c15c9bcbceff5b # Parent 5c1702e8d2a4f31bfdf40cbd60f192d10f827581 optimisation, again. diff -r 5c1702e8d2a4 -r 5ff6273e3626 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);