Skip to content

Add zooming support and improve keyboard navigation - #41

Open
ZardashtKaya wants to merge 2 commits into
ShenMian:mainfrom
ZardashtKaya:main
Open

Add zooming support and improve keyboard navigation#41
ZardashtKaya wants to merge 2 commits into
ShenMian:mainfrom
ZardashtKaya:main

Conversation

@ZardashtKaya

Copy link
Copy Markdown

Changes Log

World Map Zooming & Panning

  • Zoom Functionality: Implemented map zooming with support for magnification levels.
  • Vertical Panning: Added latitude offset tracking to allow vertical scrolling when zoomed in.
  • Controls Update:
    • Dedicated WASD keys for map movement (Up, Down, Left, Right).
    • Added Q and E (plus + and -) for zooming out and in.
    • Disabled mouse scroll wheel for zooming/panning per user preference.
  • Global Keys: Removed q as a global quit shortcut to avoid conflict with the new zoom-out key. Users should now use Ctrl-C to exit.

Rendering Improvements

  • Pole Crossing Fix: Refactored line drawing logic to correctly handle segments crossing the North and South poles, preventing "stretched" horizontal line artifacts.
  • IDL Seamless Wrapping: Improved International Date Line (IDL) wrapping logic for both lines and text, ensuring smooth transitions when panning or zooming.
  • Higher Resolution: Increased the step resolution for the day-night terminator and visibility circle calculations by 5x for smoother rendering at high zoom.
  • Multi-Offset Rendering: Implemented a draw_text helper to render satellite labels and symbols at multiple 180-degree offsets to handle map wrapping perfectly.

Satellite Groups & Timeline Enhancements

  • Timeline Controls: Added Left and Right arrow keys for precise time adjustment.
  • Group Search: Added a new search feature to the Satellite Groups widget:
    • Press / to enter search mode and filter groups by name.
    • Title bar displays the current search query.
  • Group Navigation: Added Up and Down arrow keys for navigating the list.
  • Group Selection: Added Spacebar as a keyboard shortcut to toggle selection of the highlighted group.

Documentation & Localization

  • Updated docs/keymap.md with the new keyboard and mouse interaction model.
  • Updated locales/en.yml with new translations for search and zoom features.
  • Updated the in-app Keymap popup (?) to reflect all control changes across all widgets.

Technical Fixes

  • Dependency Compatibility: Downgraded the fixed crate to v1.28.0 to ensure compatibility with Rust 1.90.0.
  • Stable Rust Support: Replaced the unstable Duration::from_mins with a stable alternative.
  • Type & Lifetime Safety: Resolved various compilation errors related to type mismatches and borrow checker constraints in the new widget logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant