Daniel@0
|
1 "use strict";
|
Daniel@0
|
2
|
Daniel@0
|
3 App.module("RepresentationModule", function(RepresentationModule, App, Backbone, Marionette, $, _, Logger) {
|
Daniel@0
|
4
|
Daniel@0
|
5 RepresentationModule.addInitializer(function(options){
|
Daniel@0
|
6
|
Daniel@0
|
7 RepresentationModule.registerMaster({
|
Daniel@0
|
8 id: "view.collection.tempo-histogram",
|
Daniel@0
|
9 inherit: "view.collection._histogram",
|
Daniel@0
|
10
|
Daniel@0
|
11 defaultConfigParameterValues: {
|
Daniel@0
|
12 tempoMin: 30,
|
Daniel@0
|
13 tempoMax: 300,
|
Daniel@0
|
14 tempoNumBins: 50,
|
Daniel@0
|
15 tempoPeriod: 1,
|
Daniel@0
|
16 },
|
Daniel@0
|
17
|
Daniel@0
|
18
|
Daniel@0
|
19 // =================================================================
|
Daniel@0
|
20 // config grid header
|
Daniel@0
|
21
|
Daniel@0
|
22 // _generateHeaderLabelSuffix: function(headerView) {
|
Daniel@0
|
23 // var labelSuffixParts = [];
|
Daniel@0
|
24 // var viewConfig = headerView.options.config;
|
Daniel@0
|
25 // if (!this.configGridParameterHasDefaultValue(viewConfig, "tempoMin")
|
Daniel@0
|
26 // || !this.configGridParameterHasDefaultValue(viewConfig, "tempoMax")) {
|
Daniel@0
|
27 // labelSuffixParts.push(_.str.sprintf(" [%s, %s]",
|
Daniel@0
|
28 // this.getConfigParameterValueOrDefaultValue(viewConfig, "tempoMin"),
|
Daniel@0
|
29 // this.getConfigParameterValueOrDefaultValue(viewConfig, "tempoMax")
|
Daniel@0
|
30 // ));
|
Daniel@0
|
31 // }
|
Daniel@0
|
32 // return labelSuffixParts.join("");
|
Daniel@0
|
33 // },
|
Daniel@0
|
34
|
Daniel@0
|
35
|
Daniel@0
|
36 // =================================================================
|
Daniel@0
|
37 // vis instance rendering
|
Daniel@0
|
38
|
Daniel@0
|
39
|
Daniel@0
|
40 // -----------------------------------------------------------------
|
Daniel@0
|
41 // vis instance rendering - base
|
Daniel@0
|
42
|
Daniel@0
|
43 _generateCustomParamsForBasePerspectiveRequestParams: function(viewConfig) {
|
Daniel@0
|
44 var result = {
|
Daniel@0
|
45 "min": this.getConfigParameterValueOrDefaultValue(viewConfig, "tempoMin"),
|
Daniel@0
|
46 "max": this.getConfigParameterValueOrDefaultValue(viewConfig, "tempoMax"),
|
Daniel@0
|
47 //"num_bins": this.getConfigParameterValueOrDefaultValue(viewConfig, "tempoNumBins"),
|
Daniel@0
|
48 //"period": this.getConfigParameterValueOrDefaultValue(viewConfig, "tempoPeriod"),
|
Daniel@0
|
49 };
|
Daniel@0
|
50 return result;
|
Daniel@0
|
51 },
|
Daniel@0
|
52 });
|
Daniel@0
|
53 });
|
Daniel@0
|
54 }, Logger);
|