Skip to content

fix: keep minimap viewport outline visible - #16

Merged
fangsmile merged 1 commit into
developfrom
codex/fix-minimap-viewport-clipping
Nov 23, 2026
Merged

fangsmile merged 1 commit into
developfrom
codex/fix-minimap-viewport-clipping

Conversation

@fangsmile

Copy link
Copy Markdown
Contributor

🤔 This is a ...

  • Bug fix
  • Test Case

💡 Background and solution

When the graph initially fits the view or is panned, the viewport can project partly outside the minimap. VGraph positioned the border on the full projected rectangle, and the minimap's overflow clipping hid whichever edge fell outside its drawing area. With a negative left coordinate, the left side of the outline disappeared.

Render the viewport at the intersection with the minimap's drawing bounds. Click-to-center and dragging still use the full projected coordinates so clipping the outline does not shift navigation.

📝 Changelog

Language Changelog
🇺🇸 English Keep the minimap viewport outline visible at the map boundaries while preserving click and drag navigation.
🇨🇳 Chinese 修复视口超出小地图绘制区时边线消失的问题,保留点击定位和拖动交互。

✅ Tests

  • VGraph package Jest suite passed all 131 suites. 742 tests passed and 5 were skipped.
  • The minimap tests cover overflow on all sides, a fully off-map viewport, and click-to-center using the full projected rectangle.
  • TypeScript check passed with tsc -p tsconfig.json --noEmit from packages/vgraph.

☑️ Self-Check before Merge

  • No documentation or public TypeScript definition change is needed.
  • Regression coverage and a Rush patch changefile are included.

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

@fangsmile
fangsmile merged commit 8a96ba2 into develop Nov 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant