bug fix
This commit is contained in:
parent
f99e61e749
commit
bfb0b16554
1 changed files with 8 additions and 2 deletions
10
JS/index.js
10
JS/index.js
|
@ -90,9 +90,12 @@ function Music() {
|
|||
}, 180000);
|
||||
}
|
||||
|
||||
let ArrowRunning = false;
|
||||
|
||||
// Clicking the next button
|
||||
ArrowsButton[1].onclick = (event) => {
|
||||
if (!ContainerContainer.classList.contains("NextAnimation")) {
|
||||
if (!ContainerContainer.classList.contains("NextAnimation") && ArrowRunning == false) {
|
||||
ArrowRunning = true;
|
||||
UpdateOtherContainers(1);
|
||||
ContainerContainer.classList.add("NextAnimation");
|
||||
ButtonSound.play();
|
||||
|
@ -100,12 +103,14 @@ ArrowsButton[1].onclick = (event) => {
|
|||
ContainerContainer.classList.remove("NextAnimation");
|
||||
}, 1000);
|
||||
PosterContainerUpdate("Forward");
|
||||
ArrowRunning = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Clicking the back button
|
||||
ArrowsButton[0].onclick = (event) => {
|
||||
if (!ContainerContainer.classList.contains("BackAnimation")) {
|
||||
if (!ContainerContainer.classList.contains("BackAnimation") && ArrowRunning == false) {
|
||||
ArrowRunning = true;
|
||||
UpdateOtherContainers(3);
|
||||
ContainerContainer.classList.add("BackAnimation");
|
||||
ButtonSound.play();
|
||||
|
@ -113,6 +118,7 @@ ArrowsButton[0].onclick = (event) => {
|
|||
ContainerContainer.classList.remove("BackAnimation");
|
||||
}, 1000);
|
||||
PosterContainerUpdate("Backward");
|
||||
ArrowRunning = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue