From 7a5df6045acc045337f6f8da4acc91933f240202 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 2 May 2024 14:06:32 -0500 Subject: [PATCH] make circle radius larger on mobile only (#11210) --- web/src/components/settings/PolygonDrawer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/components/settings/PolygonDrawer.tsx b/web/src/components/settings/PolygonDrawer.tsx index 99d05888e..a2209d35e 100644 --- a/web/src/components/settings/PolygonDrawer.tsx +++ b/web/src/components/settings/PolygonDrawer.tsx @@ -9,6 +9,7 @@ import { import type { KonvaEventObject } from "konva/lib/Node"; import Konva from "konva"; import { Vector2d } from "konva/lib/types"; +import { isMobileOnly } from "react-device-detect"; type PolygonDrawerProps = { points: number[][]; @@ -45,7 +46,7 @@ export default function PolygonDrawer({ handleMouseOverAnyPoint, handleMouseOutAnyPoint, }: PolygonDrawerProps) { - const vertexRadius = 6; + const vertexRadius = isMobileOnly ? 12 : 6; const flattenedPoints = useMemo(() => flattenPoints(points), [points]); const [stage, setStage] = useState(); const [minMaxX, setMinMaxX] = useState([0, 0]);