From 4099aa03f25a7e54ea40c2e05daf3457e1ffc6a7 Mon Sep 17 00:00:00 2001 From: Olivia206 <olivia.simonet206@gmail.com> Date: Fri, 23 Feb 2024 17:55:14 +0100 Subject: [PATCH] fix --- assets/js/theme/blocks/draggableBlocks.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/assets/js/theme/blocks/draggableBlocks.js b/assets/js/theme/blocks/draggableBlocks.js index b46ec473..ae6e6f17 100644 --- a/assets/js/theme/blocks/draggableBlocks.js +++ b/assets/js/theme/blocks/draggableBlocks.js @@ -9,7 +9,6 @@ class DraggableBlock { this.previous = this.block.querySelector('.previous'); this.next = this.block.querySelector('.next'); this.isPointerDown = false; - this.clicOnBtn = false; this.index = 0; @@ -56,12 +55,10 @@ class DraggableBlock { handleArrows () { this.previous.addEventListener('click', () => { - this.clicOnBtn = true; this.goTo(this.index-1); }); this.next.addEventListener('click', () => { - this.clicOnBtn = true; this.goTo(this.index+1); }); } @@ -75,7 +72,6 @@ class DraggableBlock { this.block.addEventListener('pointerdown', (event) => { if (event.target !== this.next && event.target !== this.previous) { - this.clicOnBtn = false; this.isPointerDown = true; this.content.classList.add('is-grabbing'); startX = event.clientX; @@ -124,7 +120,6 @@ class DraggableBlock { } else if (start < end - threshold) { this.goTo(this.index-1); } - this.clicOnBtn = false; this.content.classList.remove('is-grabbing'); this.items.forEach((item) => { -- GitLab