mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-10 08:15:00 -04:00
Hide controls when output is maximised
This commit is contained in:
parent
3472484601
commit
5e05c59a5a
1 changed files with 14 additions and 5 deletions
|
@ -628,12 +628,21 @@ class RecipeWaiter {
|
||||||
bakeIcon.style.display = "inline-block";
|
bakeIcon.style.display = "inline-block";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale controls to fit pane width
|
// Hide recipe controls when output is maximised
|
||||||
const controls = document.getElementById("controls");
|
if (document.getElementById("i") === "fullscreen") {
|
||||||
const controlsContent = document.getElementById("controls-content");
|
document.getElementById("controls").style.display = "none";
|
||||||
const scale = (controls.clientWidth - 1) / controlsContent.scrollWidth;
|
}
|
||||||
|
else {
|
||||||
|
// Show recipe controls if they are not already shown
|
||||||
|
document.getElementById("controls").style.display = "inherit";
|
||||||
|
|
||||||
controlsContent.style.transform = `translate(-50%, -50%) scale(${scale})`;
|
// Scale controls to fit pane width
|
||||||
|
const controls = document.getElementById("controls");
|
||||||
|
const controlsContent = document.getElementById("controls-content");
|
||||||
|
const scale = (controls.clientWidth - 1) / controlsContent.scrollWidth;
|
||||||
|
|
||||||
|
controlsContent.style.transform = `translate(-50%, -50%) scale(${scale})`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue