Skip to content

Commit 28c9476

Browse files
made telemtry graph to expand on startup
1 parent 86d8a05 commit 28c9476

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

js/app.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var embed = {
1919
enabled: false,
2020
vlist: true,
2121
graph: true,
22-
graph_exapnded: false,
22+
graph_expanded: true,
2323
}
2424
var params = window.location.search.substring(1).split('&');
2525

@@ -31,7 +31,7 @@ for(var idx in params) {
3131
case "embed": if(line[1] == "1") embed.enabled = true; break;
3232
case "hidelist": if(line[1] == "1") embed.vlist = false; break;
3333
case "hidegraph": if(line[1] == "1") embed.graph = false; break;
34-
case "expandgraph": if(line[1] == "1") embed.graph_expanded = true; break;
34+
case "expandgraph": if(line[1] == "0") embed.graph_expanded = false; break;
3535
case "filter": vfilter = line[1]; break;
3636
case "nyan": nyan_mode = true; break;
3737
}
@@ -346,9 +346,6 @@ $(window).ready(function() {
346346
});
347347
});
348348

349-
// expand graph on startup, if nessary
350-
if(embed.graph_expanded) $('#telemetry_graph .graph_label').click();
351-
352349
// reset nite-overlay and timebox when mouse goes out of the graph box
353350
$("#telemetry_graph").on('mouseout','.holder', function() {
354351
nite.setDate(null);

js/tracker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,9 @@ function zoom_on_payload() {
13601360
// scroll list to the expanded element
13611361
listScroll.refresh();
13621362
listScroll.scrollToElement('.portrait .vehicle'+i);
1363+
1364+
// expand graph on startup, if nessary
1365+
if(embed.graph_expanded && !is_mobile) $('#telemetry_graph .graph_label').click();
13631366
}
13641367

13651368
function isInt(n) {

0 commit comments

Comments
 (0)