Skip to content

Flight plan pin-to-map + PNG export#337

Closed
msupino wants to merge 12 commits into
devfrom
dev-planPin-export
Closed

Flight plan pin-to-map + PNG export#337
msupino wants to merge 12 commits into
devfrom
dev-planPin-export

Conversation

@msupino

@msupino msupino commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a pin button 📌 to the flight plan window. When pinned:

  1. The flight plan stays visible on the map (positioned with the existing drag).
  2. A resize handle at the bottom-right corner allows drag-resizing.
  3. The plan is rendered on PNG export at its screen position/size.

Changes

  • docs/io.js — Pin button + resize handle in showFlightPlan(); drawFlightPlanTable() canvas renderer; export integration in exportPNG().
  • docs/style.css.modal-pin and .resize-handle styles.
  • docs/core.js — EN strings fpPin / fpUnpin.
  • docs/he/strings.js — HE strings fpPin / fpUnpin.
  • tests/flight-plan.spec.js — Pin toggle, state persistence, resize handle test.
  • tests/export-png-options.spec.js — Export with pinned plan downloads successfully.

How it works

  1. Open flight plan (📋 Plan).
  2. Click 📌 to pin it.
  3. Drag the resize handle (bottom-right corner) to size it.
  4. Open 📤 Export/Import → Export PNG and click Export.
  5. The pinned flight plan appears in the exported image.

Fixes #336

msupino added 2 commits May 26, 2026 12:39
- Pin button on flight plan modal toggles pinned state (persisted in navaid.planPin).
- Resize handle (bottom-right corner) for drag-resizing the flight plan box; size saved to navaid.planW/H.
- drawFlightPlanTable() renders the flight-plan table on a canvas context.
- exportPNG() includes the pinned flight plan at its screen position/size when pinned.
- CSS: .modal-pin, .resize-handle styles.
- EN/HE i18n: fpPin, fpUnpin strings.
- Tests: pin toggle, persist on close/reopen, resize handle visibility, export with pinned plan.
- Resize from all four corners (not just bottom-right).
- Font size shrinks to fit content when pinned (no scrolling).
- Gold border + glow on pinned box to indicate pin state.
- Print button hidden when pinned.
Add --blocked-url-patterns to Lighthouse CLI so GA/Tag Manager
requests don't fire during CI runs, avoiding unnecessary GA quota
consumption.
- Move computePlanFontSize / applyPlanFontSize to outer scope so
  pinBtn.onclick can call them (was trapped inside makeCornerHandle).
- Lower minimum font size from 6px to 4px so content fits without
  scrolling even on very small boxes.
@msupino msupino closed this May 26, 2026
@msupino msupino reopened this May 26, 2026
@msupino msupino closed this May 26, 2026
@msupino msupino reopened this May 26, 2026
@msupino

msupino commented May 26, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #338 (same code, new branch to unblock stuck deploy)

@msupino msupino closed this May 26, 2026
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