Skip to content

Commit 21df85a

Browse files
committed
Graph dialog: Remove flightLog argument from routines that don't need it
1 parent e9d2148 commit 21df85a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

js/graph_config_dialog.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function GraphConfigurationDialog(dialog, onSave) {
2424
* Render the element for the "pick a field" dropdown box. Provide "field" from the config in order to set up the
2525
* initial selection.
2626
*/
27-
function renderField(flightLog, field) {
27+
function renderField(field) {
2828
var
2929
elem = $(
3030
'<li class="config-graph-field">'
@@ -43,7 +43,7 @@ function GraphConfigurationDialog(dialog, onSave) {
4343
return elem;
4444
}
4545

46-
function renderGraph(flightLog, index, graph) {
46+
function renderGraph(index, graph) {
4747
var
4848
graphElem = $(
4949
'<li class="config-graph">'
@@ -75,14 +75,14 @@ function GraphConfigurationDialog(dialog, onSave) {
7575

7676
// "Add field" button
7777
$("button", graphElem).click(function(e) {
78-
fieldList.append(renderField(flightLog, {}));
78+
fieldList.append(renderField({}));
7979
e.preventDefault();
8080
});
8181

8282
for (var i = 0; i < graph.fields.length; i++) {
8383
var
8484
field = graph.fields[i],
85-
fieldElem = renderField(flightLog, field);
85+
fieldElem = renderField(field);
8686

8787
fieldList.append(fieldElem);
8888
}
@@ -104,14 +104,14 @@ function GraphConfigurationDialog(dialog, onSave) {
104104
return graphElem;
105105
}
106106

107-
function renderGraphs(flightLog, graphs) {
107+
function renderGraphs(graphs) {
108108
var
109109
graphList = $(".config-graphs-list", dialog);
110110

111111
graphList.empty();
112112

113113
for (var i = 0; i < graphs.length; i++) {
114-
graphList.append(renderGraph(flightLog, i, graphs[i]));
114+
graphList.append(renderGraph(i, graphs[i]));
115115
}
116116
}
117117

@@ -236,7 +236,7 @@ function GraphConfigurationDialog(dialog, onSave) {
236236
buildOfferedFieldNamesList(flightLog, config);
237237

238238
populateExampleGraphs(flightLog, exampleGraphsMenu);
239-
renderGraphs(flightLog, config);
239+
renderGraphs(config);
240240
}
241241

242242
$(".graph-configuration-dialog-save").click(function(e) {
@@ -252,7 +252,7 @@ function GraphConfigurationDialog(dialog, onSave) {
252252
exampleGraphsMenu.on("click", "a", function(e) {
253253
var
254254
graph = exampleGraphs[$(this).data("graphIndex")],
255-
graphElem = renderGraph(flightLog, $(".config-graph", dialog).length, graph);
255+
graphElem = renderGraph($(".config-graph", dialog).length, graph);
256256

257257
$(".config-graphs-list", dialog).append(graphElem);
258258

0 commit comments

Comments
 (0)