Add mobile touch support for elevation chart interaction
- Single touch + drag: scrub the highlight point along the chart, map dot follows in real-time - Tap: pan map to that point (10px threshold for movement) - Two-finger touch: range select — area between fingers highlighted, on release zooms map to fit that route section - touch-none CSS + preventDefault prevents page scrolling on chart Spec updated with mobile touch interaction scenarios. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3345ef127e
commit
66885c82f2
2 changed files with 176 additions and 1 deletions
|
|
@ -29,3 +29,24 @@ Dragging a range on the elevation chart SHALL zoom the map to fit that section o
|
|||
#### Scenario: Reset zoom
|
||||
- **WHEN** the map has been zoomed via chart drag-select
|
||||
- **THEN** a reset button appears to return to the full route view
|
||||
|
||||
### Requirement: Mobile touch interaction
|
||||
The elevation chart SHALL support touch-based interaction on mobile devices.
|
||||
|
||||
#### Scenario: Single touch scrub
|
||||
- **WHEN** a user touches and drags on the chart with one finger
|
||||
- **THEN** the crosshair follows the finger position along the chart
|
||||
- **AND** the map highlight dot follows in real-time
|
||||
|
||||
#### Scenario: Tap to pan
|
||||
- **WHEN** a user taps the chart (touch without significant movement)
|
||||
- **THEN** the map pans to that point along the route
|
||||
|
||||
#### Scenario: Two-finger range select
|
||||
- **WHEN** a user places two fingers on the chart
|
||||
- **THEN** the area between the fingers is highlighted as a selection range
|
||||
- **AND** on release, the map zooms to fit the route coordinates in that range
|
||||
|
||||
#### Scenario: No page scroll on touch
|
||||
- **WHEN** a user touches the elevation chart
|
||||
- **THEN** page scrolling is prevented (touch-none CSS + preventDefault)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue