|
| 1 | +# Implementation Plan: Fix Map Roam Drag in Pointer-Only Mobile Browsers |
| 2 | + |
| 3 | +**Branch**: `009-fix-map-roam-pointer-drag` | **Date**: 2026-03-19 | **Spec**: [spec.md](./spec.md) |
| 4 | +**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. |
| 19 | +**Project Type**: Visualization Library (Monorepo) |
| 20 | +**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. |
0 commit comments