blob: e663583f445a3ba1536fecc4b0e63d83c8ea71fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/***********************************************************************
* Stats registry data structure
**********************************************************************/
var GrasStatsRegistry = function()
{
this.ids = new Array();
this.enables = new Array();
this.history = new Array();
this.block_enables = new Array();
this.overall_rate = 2.0;
this.overall_active = true;
this.block_charts = new Array();
}
GrasStatsRegistry.prototype.appendPoint = function(point)
{
this.history.push(point);
var self = this;
if (this.history.length == 1)
{
$('block', this.history[0]).each(function()
{
self.ids.push($(this).attr('id'));
});
}
};
GrasStatsRegistry.prototype.getBlockIds = function()
{
var ids = new Array();
$('block', this.history[0]).each(function()
{
ids.push($(this).attr('id'));
});
return ids;
};
|