Merge branch 'vk'

This commit is contained in:
Matthias Wirth
2020-11-13 18:42:31 +01:00
3 changed files with 9 additions and 59 deletions

View File

@@ -587,20 +587,6 @@ function initialize() {
buttonActive('#P', noVanish);
}
let coll = document.getElementsByClassName("collapseButton");
for (let i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
let content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}
$('#tabs').tabs({
active: localStorage['active_tab'],
activate: function (event, ui) {
@@ -3971,8 +3957,6 @@ function toggleShowTrace() {
showTraceWasIsolation = onlySelected;
toggleIsolation("on", null);
shiftTrace();
$('#history_collapse')[0].style.display = "block";
$('#show_trace').addClass("active");
} else {
showTrace = false;
legSel = -1;
@@ -3983,13 +3967,18 @@ function toggleShowTrace() {
//window.history.replaceState("object or string", "Title", string);
//shareLink = string;
updateAddressBar();
$('#history_collapse')[0].style.display = "none";
$('#show_trace').removeClass("active");
const hex = SelectedPlane.icao;
SelectedPlane = null;
showTraceExit = true;
selectPlaneByHex(hex, {follow: true, zoom: ZoomLvl,});
}
$('#history_collapse').toggle({
duration: 0,
complete: function () {
$('#show_trace').toggleClass('active');
}
});
}
function legShift(offset) {