hiding spacers when needed

This commit is contained in:
Miodec 2022-08-24 15:00:44 +02:00
parent d8ebc2cde9
commit 8268f3e122
2 changed files with 13 additions and 1 deletions

View file

@ -1010,6 +1010,11 @@
border-radius: calc(var(--roundness) / 2);
background: var(--bg-color);
margin: auto 1rem;
transition: 0.25s;
&.scrolled {
width: 0;
margin: auto 0;
}
}
.textButton {
transition: 0.125s;

View file

@ -94,6 +94,7 @@ export async function update(
) {
//show
$("#testConfig .leftSpacer").removeClass("scrolled");
$("#testConfig .puncAndNum")
.css({
opacity: 0,
@ -112,7 +113,7 @@ export async function update(
puncAndNumVisible[current] == false
) {
//hide
$("#testConfig .leftSpacer").addClass("scrolled");
$("#testConfig .puncAndNum")
.css({
opacity: 1,
@ -128,6 +129,12 @@ export async function update(
);
}
if (current == "zen") {
$("#testConfig .rightSpacer").addClass("scrolled");
} else {
$("#testConfig .rightSpacer").removeClass("scrolled");
}
// const currentWidth = Math.round(
// document.querySelector("#testConfig .row")?.getBoundingClientRect().width ??
// 0