From 8c576cc586f9d28dabadd64bc3bd4c4219caf5c5 Mon Sep 17 00:00:00 2001 From: YoniKiriaty Date: Wed, 18 Feb 2026 17:14:50 +0200 Subject: [PATCH 1/2] Yoni - added tapping --- .../frontend/src/scouter/components/ScoreMap.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx b/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx index 6b535259..df37d2d9 100644 --- a/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx +++ b/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx @@ -8,6 +8,7 @@ import { useState, type TouchEvent, type Touch, + useEffect, } from "react"; import type { Alliance, Point } from "@repo/scouting_types"; import { @@ -108,9 +109,6 @@ export const ScoreMap: FC = ({ const imageRef = useRef(null); const [mapPoint, setMapPoint] = useState(currentPoint); const handleMapClick = (event: TouchEvent) => { - if (!isHolding) { - return; - } const containerElement = containerRef.current; const imageElement = imageRef.current; if (!(containerElement && imageElement)) { @@ -147,9 +145,14 @@ export const ScoreMap: FC = ({ { + onTouchMove={(event) => { + if (isHolding) { + handleMapClick(event); + } + }} + onTouchStart={(event) => { setHolding(true); + handleMapClick(event); }} onTouchEnd={() => { setHolding(false); From 7cb721781d9079239ef4d3262df61df969b9b005 Mon Sep 17 00:00:00 2001 From: YoniKiriaty Date: Wed, 18 Feb 2026 17:17:32 +0200 Subject: [PATCH 2/2] Yoni - removed useEffect --- apps/scouting/frontend/src/scouter/components/ScoreMap.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx b/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx index df37d2d9..253485c8 100644 --- a/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx +++ b/apps/scouting/frontend/src/scouter/components/ScoreMap.tsx @@ -8,7 +8,6 @@ import { useState, type TouchEvent, type Touch, - useEffect, } from "react"; import type { Alliance, Point } from "@repo/scouting_types"; import {