Skip to content

Commit

Permalink
Canvas remove touch interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
phisn committed May 13, 2024
1 parent 6328efe commit 607b75d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/web/src/app/play/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,19 @@ export function Game(props: {
}
}, [gameLoop])

return <canvas className="absolute inset-0 z-0 h-full w-full" ref={canvasRef} />
return (
<canvas
style={{
position: "relative",
height: "100%",
width: "100%",
overflow: "hidden",
pointerEvents: "auto",
touchAction: "none",
WebkitUserSelect: "none",
}}
className="absolute inset-0 z-0 h-full w-full select-none"
ref={canvasRef}
/>
)
}

0 comments on commit 607b75d

Please sign in to comment.