You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"comment": "update changes for 009-fix-map-roam-pointer-drag: This plan fixes a map roam drag bug where mobile browsers lose stable vertical dragging after supportsTouchEvents is forced to false",
**Input**: Feature specification from `/specs/009-fix-map-roam-pointer-drag/spec.md`
5
+
6
+
## Summary
7
+
8
+
This plan fixes a map roam drag bug where mobile browsers lose stable vertical dragging after `supportsTouchEvents` is forced to `false`, because the browser's default touch gesture handling interrupts pointer-based drag sequences for geo roam regions.
9
+
10
+
## Technical Context
11
+
12
+
**Language/Version**: TypeScript 4.x
13
+
**Primary Dependencies**:
14
+
-`@visactor/vrender-core`: Provides stage, canvas access, and global environment capability flags.
15
+
-`@visactor/vutils`: Provides utility helpers already used by the compiler layer.
16
+
**Storage**: N/A
17
+
**Testing**: No new automated test is required for this change.
18
+
**Target Platform**: Browser rendering, especially mobile browsers using pointer events without touch events.
**Performance Goals**: No regression in render or interaction performance.
21
+
**Constraints**: Must only affect geo roam drag scenarios and must not globally disable page scroll for unrelated charts.
22
+
**Scale/Scope**: Compiler-level canvas style adjustment for map roam interaction.
23
+
24
+
## Constitution Check
25
+
26
+
-[x] Quality First: Fix is isolated to the browser interaction environment for the affected scenario.
27
+
-[x] User Experience-Driven: Removes a broken drag path in a valid mobile embedding scenario.
28
+
-[x] SDD: Uses specs as the semantic source for delivery artifacts.
29
+
-[x] Unit Tests: Not required for this change by request.
30
+
-[x] Compatibility: Non-breaking fix (PATCH).
31
+
32
+
## Project Structure
33
+
34
+
### Documentation (this feature)
35
+
36
+
```text
37
+
specs/009-fix-map-roam-pointer-drag/
38
+
├── plan.md
39
+
├── spec.md
40
+
└── checklists/
41
+
└── requirements.md
42
+
```
43
+
44
+
### Source Code (repository root)
45
+
46
+
```text
47
+
packages/vchart/
48
+
├── src/
49
+
│ └── compile/
50
+
│ └── compiler.ts
51
+
└── specs/
52
+
└── 009-fix-map-roam-pointer-drag/
53
+
├── plan.md
54
+
├── spec.md
55
+
└── checklists/
56
+
└── requirements.md
57
+
```
58
+
59
+
**Structure Decision**: Update the compiler canvas style handling in `packages/vchart/src/compile/compiler.ts` and describe the change in a dedicated spec directory for downstream changelog, commit, and PR generation.
Fix a map interaction bug where dragging a roam-enabled map fails on mobile browsers when VChart is configured to use pointer events without touch events.
10
+
11
+
## User Scenarios
12
+
13
+
### Primary User Story
14
+
15
+
As a VChart user embedding a roam-enabled map in a mobile web page, I want vertical and horizontal dragging to remain stable when `supportsTouchEvents` is disabled, so that the map can still be panned reliably in pointer-only environments.
16
+
17
+
## Requirements
18
+
19
+
### Functional Requirements
20
+
21
+
1. The map component MUST support stable drag roaming on mobile browsers when `VChart.vglobal.supportsTouchEvents` is set to `false`.
22
+
2. The fix MUST prevent the browser's default touch gesture handling from interrupting map drag sequences when a geo region enables roam dragging.
23
+
3. The fix MUST preserve existing drag behavior for roam-enabled geo maps in normal browser rendering.
24
+
4. The fix MUST NOT change interaction behavior for charts that are not geo roam drag scenarios.
25
+
26
+
### Edge Cases
27
+
28
+
1. When a geo region disables `roam.drag`, the browser's default touch behavior should remain unchanged.
29
+
2. When a chart does not use geo regions, the fix should not alter canvas touch handling.
30
+
3. When roam is toggled by spec updates, the canvas touch handling should reflect the latest spec state.
31
+
32
+
## Success Criteria
33
+
34
+
1. In pointer-only mobile browser mode, initial vertical dragging on a roam-enabled map no longer enters a broken partial-drag state.
35
+
2. Horizontal and vertical panning both work consistently without requiring a prior horizontal gesture.
36
+
3. Non-map or non-roam charts keep their existing page scrolling behavior.
0 commit comments