forked from MapComplete/MapComplete
Fix: direction input does not scroll anymore when dragged, fix #1468
This commit is contained in:
parent
92b3ee4bae
commit
102892ec77
1 changed files with 2 additions and 1 deletions
|
@ -50,12 +50,13 @@
|
||||||
on:mousemove={(e) => {
|
on:mousemove={(e) => {
|
||||||
if (isDown) {
|
if (isDown) {
|
||||||
onPosChange(e.clientX, e.clientY)
|
onPosChange(e.clientX, e.clientY)
|
||||||
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
on:mouseup={() => {
|
on:mouseup={() => {
|
||||||
isDown = false
|
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)}
|
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">
|
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue