handle all button types
This commit is contained in:
4
app.js
4
app.js
@@ -568,14 +568,10 @@ if ('serviceWorker' in navigator) {
|
|||||||
|
|
||||||
function handleSingleClickLogic(buttonId) {
|
function handleSingleClickLogic(buttonId) {
|
||||||
console.log(`Single Click Logic Executed from Button: ${buttonId}`);
|
console.log(`Single Click Logic Executed from Button: ${buttonId}`);
|
||||||
if (!isDragging) return;
|
|
||||||
|
|
||||||
isDragging = false;
|
|
||||||
|
|
||||||
if (buttonId === BUTTON_ID) {
|
if (buttonId === BUTTON_ID) {
|
||||||
moveCarousel(-1);
|
moveCarousel(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset carousel to proper position
|
// Reset carousel to proper position
|
||||||
carousel.style.transform = `translateX(${-100 * currentPlayerIndex}%)`;
|
carousel.style.transform = `translateX(${-100 * currentPlayerIndex}%)`;
|
||||||
renderPlayers();
|
renderPlayers();
|
||||||
|
|||||||
Reference in New Issue
Block a user