Skip to content

Commit f0403ba

Browse files
Revert "auto expand graph on startup"
Reverts commits: f47592c 28c9476
1 parent de53595 commit f0403ba

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

js/app.js

Lines changed: 7 additions & 11 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_expanded: true,
22+
graph_exapnded: false,
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] == "0") embed.graph_expanded = false; break;
34+
case "expandgraph": if(line[1] == "1") embed.graph_expanded = true; break;
3535
case "filter": vfilter = line[1]; break;
3636
case "nyan": nyan_mode = true; break;
3737
}
@@ -329,31 +329,27 @@ $(window).ready(function() {
329329

330330
$('#telemetry_graph').on('click', '.graph_label', function() {
331331
var e = $(this);
332-
var analytics = true;
333-
334-
if(e.hasClass("noanalytics")) {
335-
analytics = false;
336-
e.removeClass("noanalytics");
337-
}
338-
339332
if(e.hasClass('active')) {
340333
e.removeClass('active');
341334
var h = $('#map').height() + $('#telemetry_graph').height();
342335

343336
//analytics
344-
if(typeof _gaq == 'object' && analytics) _gaq.push(['_trackEvent', 'UI', 'Collapse', 'Telemetry Graph']);
337+
if(typeof _gaq == 'object') _gaq.push(['_trackEvent', 'UI', 'Collapse', 'Telemetry Graph']);
345338
} else {
346339
e.addClass('active');
347340
var h = $('#map').height() - $('#telemetry_graph').height();
348341

349342
//analytics
350-
if(typeof _gaq == 'object' && analytics) _gaq.push(['_trackEvent', 'UI', 'Expand', 'Telemetry Graph']);
343+
if(typeof _gaq == 'object') _gaq.push(['_trackEvent', 'UI', 'Expand', 'Telemetry Graph']);
351344
}
352345
$('#map').stop(null,null).animate({'height': h}, function() {
353346
if(map) google.maps.event.trigger(map, 'resize');
354347
});
355348
});
356349

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

js/tracker.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,9 +1482,6 @@ function zoom_on_payload() {
14821482
// scroll list to the expanded element
14831483
listScroll.refresh();
14841484
listScroll.scrollToElement('.portrait .vehicle'+i);
1485-
1486-
// expand graph on startup, if nessary
1487-
if(embed.graph_expanded && !is_mobile) $('#telemetry_graph .graph_label').addClass("noanalytics").click();
14881485
}
14891486

14901487
function isInt(n) {

0 commit comments

Comments
 (0)