mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Prevent default for touch events for web
This commit is contained in:
parent
bbd797dd7c
commit
5c2def48b6
@ -64,6 +64,11 @@ const start = async () => {
|
||||
console.log("Starting cache-worker")
|
||||
worker.postMessage({type: "init", memory, workerLoopPtr});
|
||||
|
||||
document.body.querySelectorAll("canvas").forEach(canvas => {
|
||||
canvas.addEventListener("touchstart", e => e.preventDefault());
|
||||
canvas.addEventListener("touchmove", e => e.preventDefault());
|
||||
})
|
||||
|
||||
await module.run(workerLoopPtr);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user