MiroFish/frontend/src
666ghj 085aa6bbe6 fix(GraphPanel): optimize force graph drag behavior to prevent simulation restart on click
Background:
- With many nodes, D3 force simulation tick callback updates all nodes/edges/labels every frame
- Original implementation called simulation.restart() in drag start event on mousedown
- Even after simulation converged, clicking a node to view details would restart simulation, causing lag

Solution:
- Distinguish between "click" and "drag" using 3px movement threshold
- On drag start: only record initial position, do not restart simulation
- On drag event: detect movement exceeding threshold before marking as actual drag and restarting simulation
- Pure click operations no longer trigger simulation restart, keeping graph static

Bug fix:
- Fixed issue where nodes became undraggable after initial optimization
- Cause: incorrectly used if(!event.active) check in drag event
- event.active equals 1 during drag event, causing restart() to never execute
- Removed that condition, using custom _isDragging flag to control logic instead
2026-01-18 22:35:24 +08:00
..
api feat(history): 添加首页历史项目展示组件 2025-12-31 17:54:39 +08:00
assets/logo Enhance homepage layout and styling 2025-12-10 15:15:44 +08:00
components fix(GraphPanel): optimize force graph drag behavior to prevent simulation restart on click 2026-01-18 22:35:24 +08:00
router Implement interaction features in Step5Interaction component and add routing for interaction view 2025-12-16 17:50:43 +08:00
store Add D3.js dependency and implement pending upload state management 2025-12-10 18:17:26 +08:00
views fix(Home.vue): update version text from V1.0 to v0.1 for accuracy 2026-01-14 15:16:52 +08:00
App.vue Update font styles across the application to include 'Noto Sans SC' for improved typography consistency. 2025-12-26 17:35:09 +08:00
main.js Add project status report and frontend documentation 2025-12-10 14:49:11 +08:00