mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-05-20 14:44:51 +02:00
feat(map): two-click selection model with precise center dot
Replaces 'every click selects something' with a deliberate two-click flow: - First click drops marker (existing circle plus new precise center dot) and opens place panel - Second click INSIDE the marker circle opens the radial menu - Second click OUTSIDE the circle deselects without selecting the new spot — requires another click to select The 4px filled center dot at exact click coordinates gives precise visual feedback for GPS-coord readout. The existing circle's radius defines the same-spot tolerance, visually showing the radial-trigger hit area. Right-click radial unchanged. Search-dropdown selection drops a marker for consistency.
This commit is contained in:
parent
a11fc13b33
commit
37a5eb5b1b
4 changed files with 111 additions and 30 deletions
|
|
@ -60,11 +60,14 @@ export const useStore = create((set, get) => ({
|
|||
|
||||
// ── Place detail ──
|
||||
selectedPlace: null, // { lat, lon, name, address, type, source, matchCode, raw }
|
||||
clickMarker: null, // { lat, lon, circleRadiusPx } — visual marker for two-click selection
|
||||
gpsOrigin: true, // whether GPS should be used as origin when available
|
||||
pendingDestination: null, // place waiting for a starting point (GPS-denied Directions flow)
|
||||
|
||||
setSelectedPlace: (place) => set({ selectedPlace: place }),
|
||||
clearSelectedPlace: () => set({ selectedPlace: null }),
|
||||
clearSelectedPlace: () => set({ selectedPlace: null, clickMarker: null }),
|
||||
setClickMarker: (marker) => set({ clickMarker: marker }),
|
||||
clearClickMarker: () => set({ clickMarker: null }),
|
||||
setGpsOrigin: (val) => set({ gpsOrigin: val }),
|
||||
setPendingDestination: (place) => set({ pendingDestination: place }),
|
||||
clearPendingDestination: () => set({ pendingDestination: null }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue