30 this.container.y = opts.yInit; |
30 this.container.y = opts.yInit; |
31 this.width = opts.width; |
31 this.width = opts.width; |
32 this.height= opts.height; |
32 this.height= opts.height; |
33 this.timeBegin = opts.timeBegin; |
33 this.timeBegin = opts.timeBegin; |
34 this.timeEnd = opts.timeEnd; |
34 this.timeEnd = opts.timeEnd; |
|
35 |
35 this.annotCategories = []; |
36 this.annotCategories = []; |
|
37 this.annotCategoriesDay2 = []; |
36 this.annotCategoriesDay1 = []; |
38 this.annotCategoriesDay1 = []; |
37 |
39 |
38 var wsPianoroll = opts.wsPianoroll; |
40 var wsPianoroll = opts.wsPianoroll; |
39 var wsAnnot = opts.wsAnnot; |
41 var wsAnnot = opts.wsAnnot; |
40 var stageView = opts.stageView; |
42 var stageView = opts.stageView; |
41 var currentTime = Date.now() + 3600*1000; |
43 var currentTime = Date.now() + 3600*1000; |
42 var eventCode = opts.eventCode; |
|
43 var eventCodeSessionDay1 = opts.eventCodeSessionDay1; |
|
44 var channel = opts.channel; |
44 var channel = opts.channel; |
45 var serverUrl = opts.serverUrl; |
45 var serverUrl = opts.serverUrl; |
46 |
46 |
47 Utils.getAnnotCategories(opts.urlCategories + eventCode, this.annotCategories); |
47 var eventCode = opts.eventCode; |
|
48 var eventCodeSessionDay2 = opts.eventCodeSessionDay2; |
|
49 var eventCodeSessionDay1 = opts.eventCodeSessionDay1; |
|
50 |
|
51 Utils.getAnnotCategories(opts.urlCategories + eventCode, this.annotCategories); |
|
52 Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay2, this.annotCategoriesDay2); |
48 Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay1, this.annotCategoriesDay1); |
53 Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay1, this.annotCategoriesDay1); |
49 |
54 |
50 stageView.registerComponent(this); |
55 stageView.registerComponent(this); |
51 |
56 |
52 var timeLineDay2 = new AnnotsTimeLine.AnnotsTimeLine({ |
57 var currentDay = new AnnotsTimeLine.AnnotsTimeLine({ |
53 stageView : stageView, |
58 stageView : stageView, |
54 logger: logger, |
59 logger: logger, |
55 ws: wsAnnot, |
60 ws: wsAnnot, |
56 xInit: 0, |
61 xInit: 0, |
57 yInit: 0, |
62 yInit: 0, |
58 width: 1024 - 200 - 200, |
63 width: 1024 - 200 - 200, |
66 eventCode: eventCode, |
71 eventCode: eventCode, |
67 channel: channel, |
72 channel: channel, |
68 serverUrl: serverUrl, |
73 serverUrl: serverUrl, |
69 annotCategories: this.annotCategories |
74 annotCategories: this.annotCategories |
70 }); |
75 }); |
71 |
76 |
72 //Archive day 1 |
77 //Archive day 2 |
73 var timeLineDay1 = new AnnotsTimeLine.AnnotsTimeLine({ |
78 var timeLineDay2 = new AnnotsTimeLine.AnnotsTimeLine({ |
74 stageView : stageView, |
79 stageView : stageView, |
75 archive: true, |
|
76 xInit: 0, |
80 xInit: 0, |
77 yInit: 0, |
81 yInit: 0, |
78 width: 1024 - 200 - 200, |
82 width: 1024 - 200 - 200, |
79 height: 768-200, |
83 height: 768-200, |
|
84 timeBegin: Date.parse("2015-01-23T09:30:00+01:00"), |
|
85 timeEnd: Date.parse("2015-01-23T18:30:00+01:00"), |
|
86 circleX: currentDay.circleX, |
|
87 circleY: currentDay.circleY, |
|
88 intervalWidth: (currentDay.radius*2/3)* currentDay.intervalWidth / currentDay.radius, |
|
89 intervalHeight: (currentDay.intervalHeight * (currentDay.radius - currentDay.radius*2/3))/ currentDay.maxCellHeight, |
|
90 maxCellHeight: (currentDay.radius - currentDay.radius*2/3)/2, |
|
91 radius: currentDay.radius*2/3, |
|
92 annotCategories: this.annotCategoriesDay2, |
|
93 eventCode: eventCodeSessionDay2, |
|
94 channel: channel, |
|
95 serverUrl: serverUrl, |
|
96 showClockGraphics:false, |
|
97 archive: true |
|
98 }); |
|
99 |
|
100 //Archive day 1 |
|
101 var timeLineDay1 = new AnnotsTimeLine.AnnotsTimeLine({ |
|
102 stageView : stageView, |
|
103 xInit: 0, |
|
104 yInit: 0, |
|
105 width: 1024 - 200 - 200, |
|
106 height: 768-200, |
80 timeBegin: Date.parse("2015-01-22T09:30:00+01:00"), |
107 timeBegin: Date.parse("2015-01-22T09:30:00+01:00"), |
81 timeEnd: Date.parse("2015-01-22T18:30:00+01:00"), |
108 timeEnd: Date.parse("2015-01-22T18:30:00+01:00"), |
82 circleX: timeLineDay2.circleX, |
109 circleX: currentDay.circleX, |
83 circleY: timeLineDay2.circleY, |
110 circleY: currentDay.circleY, |
84 intervalWidth: (timeLineDay2.radius*2/3)* timeLineDay2.intervalWidth / timeLineDay2.radius, |
111 intervalWidth: (currentDay.radius*2/3)* currentDay.intervalWidth / currentDay.radius, |
85 intervalHeight: (timeLineDay2.intervalHeight * (timeLineDay2.radius - timeLineDay2.radius*2/3))/ timeLineDay2.maxCellHeight, |
112 intervalHeight: (currentDay.intervalHeight * (currentDay.radius - currentDay.radius/3))/ currentDay.maxCellHeight, |
86 maxCellHeight: (timeLineDay2.radius - timeLineDay2.radius*2/3)/4, |
113 maxCellHeight: (currentDay.radius*2/3 - currentDay.radius/3)/4, |
87 radius: timeLineDay2.radius*2/3, |
114 radius: currentDay.radius/3, |
88 annotCategories: this.annotCategoriesDay1, |
115 annotCategories: this.annotCategoriesDay1, |
89 eventCode: eventCodeSessionDay1, |
116 eventCode: eventCodeSessionDay1, |
90 channel: channel, |
117 channel: channel, |
91 serverUrl: serverUrl, |
118 serverUrl: serverUrl, |
92 showClockGraphics:false |
119 showClockGraphics:false, |
|
120 archive: true, |
93 }); |
121 }); |
94 |
122 |
95 var currentTimeText = new PIXI.Text("-- : -- : --", { font: '18pt Gothic Standard', fill: '#646464' }); |
123 var currentTimeText = new PIXI.Text("-- : -- : --", { font: '18pt Gothic Standard', fill: '#646464' }); |
96 currentTimeText.x = timeLineDay2.circleX - currentTimeText.width/2; |
124 currentTimeText.x = timeLineDay2.circleX - currentTimeText.width/2; |
97 currentTimeText.y = timeLineDay2.circleY - currentTimeText.height/2; |
125 currentTimeText.y = timeLineDay2.circleY - currentTimeText.height/2; |
98 this.container.addChild(currentTimeText); |
126 this.container.addChild(currentTimeText); |
99 |
|
100 var timeLineDay3 = new PIXI.Graphics(); |
|
101 timeLineDay3.lineStyle(1, 0x646464) |
|
102 .drawCircle(timeLineDay2.circleX, timeLineDay2.circleY, timeLineDay2.radius/3) |
|
103 .endFill() |
|
104 this.container.addChild(timeLineDay3); |
|
105 |
127 |
106 var doubleRollH = new DoubleRoll.DoubleRoll({ |
128 var doubleRollH = new DoubleRoll.DoubleRoll({ |
107 stageView : stageView, |
129 stageView : stageView, |
108 logger: logger, |
130 logger: logger, |
109 ws: wsPianoroll, |
131 ws: wsPianoroll, |