From 6f51fd8cbeba6e185e7d6ce3936ea1f950c2626f Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Wed, 27 May 2020 16:39:53 +1000 Subject: [PATCH] Fix touch highlight for dice overlay --- src/components/map/dice/DiceScene.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/map/dice/DiceScene.js b/src/components/map/dice/DiceScene.js index 70a1d4f..eb3b3e4 100644 --- a/src/components/map/dice/DiceScene.js +++ b/src/components/map/dice/DiceScene.js @@ -4,6 +4,8 @@ import * as AMMO from "ammo.js"; import "babylonjs-loaders"; import ReactResizeDetector from "react-resize-detector"; +import usePreventTouch from "../../../helpers/usePreventTouch"; + const diceThrowSpeed = 2; function DiceScene({ onSceneMount, onPointerDown, onPointerUp }) { @@ -118,6 +120,8 @@ function DiceScene({ onSceneMount, onPointerDown, onPointerUp }) { canvasRef.current.height = height; } + usePreventTouch(containerRef); + return (