annot-server/static/js/pianoroll.js
changeset 50 5ff6273e3626
parent 49 5c1702e8d2a4
child 54 31cea001a298
equal deleted inserted replaced
49:5c1702e8d2a4 50:5ff6273e3626
   219 
   219 
   220 
   220 
   221 function addLine(){
   221 function addLine(){
   222     nbLines++;
   222     nbLines++;
   223     var graphics = new PIXI.Graphics();
   223     var graphics = new PIXI.Graphics();
   224     var x = nbLines * (lineInterval/1000) * pixelsPerSecond1;
   224     //var x = nbLines * (lineInterval/1000) * pixelsPerSecond1;
       
   225     var x = -container1.x;
   225     //console.log("nbLines = ",nbLines, "x = ", x);
   226     //console.log("nbLines = ",nbLines, "x = ", x);
   226     graphics.beginFill(0xFFFF00);
   227     graphics.beginFill(0xFFFF00);
   227     graphics.lineStyle(1, lineColor);
   228     graphics.lineStyle(1, lineColor);
   228     graphics.moveTo(x, prHeight1 - 20);
   229     graphics.moveTo(x, prHeight1 - 20);
   229     graphics.lineTo(x, prHeight1);
   230     graphics.lineTo(x, prHeight1);
   240     t.x = x + 2;
   241     t.x = x + 2;
   241     t.y = prHeight1 - 15;
   242     t.y = prHeight1 - 15;
   242     container1.addChild(t);
   243     container1.addChild(t);
   243     // Second container
   244     // Second container
   244     graphics = new PIXI.Graphics();
   245     graphics = new PIXI.Graphics();
   245     x = nbLines * (lineInterval/1000) * pixelsPerSecond2;
   246     //x = nbLines * (lineInterval/1000) * pixelsPerSecond2;
       
   247     x = -container2.x;
   246     graphics.beginFill(0xFFFF00);
   248     graphics.beginFill(0xFFFF00);
   247     graphics.lineStyle(1, lineColor);
   249     graphics.lineStyle(1, lineColor);
   248     graphics.moveTo(x, 0);
   250     graphics.moveTo(x, 0);
   249     graphics.lineTo(x, 20);
   251     graphics.lineTo(x, 20);
   250     graphics.endFill();
   252     graphics.endFill();