MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / handleClick

Function handleClick

src/components/MapView.tsx:245–253  ·  view source on GitHub ↗
(e: mapboxgl.MapMouseEvent)

Source from the content-addressed store, hash-verified

243 const map = mapRef.current;
244 if (!map || !mapLoaded) return;
245 if (!drawMode) {
246 map.getCanvas().style.cursor = "";
247 try {
248 if (map.getLayer("draw-fill")) map.removeLayer("draw-fill");
249 if (map.getLayer("draw-line")) map.removeLayer("draw-line");
250 if (map.getLayer("draw-points")) map.removeLayer("draw-points");
251 if (map.getSource("draw-preview")) map.removeSource("draw-preview");
252 if (map.getSource("draw-points")) map.removeSource("draw-points");
253 } catch {}
254 return;
255 }
256 map.getCanvas().style.cursor = "crosshair";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected