22 this.width = width; |
22 this.width = width; |
23 this.widthRoll = widthRoll; |
23 this.widthRoll = widthRoll; |
24 this.pixelsPerSecond = pixelsPerSecond; |
24 this.pixelsPerSecond = pixelsPerSecond; |
25 this.lineInterval = lineInterval; |
25 this.lineInterval = lineInterval; |
26 |
26 |
27 this.addAnnot = function(category, user, catColor){ |
27 this.addAnnot = function(category, user, color){ |
28 var graphics = new PIXI.Graphics(); |
28 var graphics = new PIXI.Graphics(); |
29 var color = catColor; |
|
30 var x = 0; |
29 var x = 0; |
31 var y = -this.container.y; |
30 var y = -this.container.y; |
32 graphics.beginFill(color); |
31 graphics.beginFill(color); |
33 graphics.drawRect(x, y, 10, 3); |
32 graphics.drawRect(x, y, 10, 3); |
34 graphics.endFill(); |
33 graphics.endFill(); |
35 |
34 |
36 this.container.addChild(graphics); |
35 this.container.addChild(graphics); |
37 |
36 |
38 var catText = new PIXI.Text(category, { font: '16pt Arial', fill: '#65A954' }); |
37 var catText = new PIXI.Text(category, { font: '16pt Arial', fill: color.replace("0x", "#") }); |
39 catText.x = x + 20; |
38 catText.x = x + 20; |
40 catText.y = y - 23; |
39 catText.y = y - 23; |
41 this.container.addChild(catText); |
40 this.container.addChild(catText); |
42 |
41 |
43 var userText = new PIXI.Text(user, { font: '10pt Arial', fill: '#444444' }); |
42 var userText = new PIXI.Text(user, { font: '10pt Arial', fill: '#444444' }); |
44 userText.x = x + 20; |
43 userText.x = x + 20; |
45 userText.y = y + 2; |
44 userText.y = y + 2; |
46 this.container.addChild(userText); |
45 this.container.addChild(userText); |
47 |
46 |
48 this.addAnnotLine(color) |
47 this.addAnnotLine(color); |
49 }; |
48 }; |
50 |
49 |
51 this.addAnnotLine = function(color){ |
50 this.addAnnotLine = function(color){ |
52 var x = this.widthRoll; |
51 var x = this.widthRoll; |
53 var y = -this.container.y; |
52 var y = -this.container.y; |