Fix: direction input does not scroll anymore when dragged, fix #1468

This commit is contained in:
Pieter Vander Vennet 2023-06-18 00:48:28 +02:00
parent 92b3ee4bae
commit 102892ec77

View file

@ -50,12 +50,13 @@
on:mousemove={(e) => {
if (isDown) {
onPosChange(e.clientX, e.clientY)
e.preventDefault()
}
}}
on:mouseup={() => {
isDown = false
}}
on:touchmove={(e) => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}
on:touchmove={(e) =>{ onPosChange(e.touches[0].clientX, e.touches[0].clientY); e.preventDefault() }}
on:touchstart={(e) => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}
>
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">