html5 boiler plate
[scannr.git] / js / flotr2 / examples / js / ExampleList.js
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
(function () {
 
var ExampleList = function () {
 
  // Map of examples.
  this.examples = {};
 
};
 
ExampleList.prototype = {
 
  add : function (example) {
    this.examples[example.key] = example;
  },
 
  get : function (key) {
    return key ? (this.examples[key] || null) : this.examples;
  },
 
  getType : function (type) {
    return Flotr._.select(this.examples, function (example) {
      return (example.type === type);
    });
  }
}
 
Flotr.ExampleList = new ExampleList();
 
})();