Skip to content

Elevation profile enhancement#1394

Merged
Azgaar merged 8 commits intomasterfrom
elevation-profile-enhancement
Apr 27, 2026
Merged

Elevation profile enhancement#1394
Azgaar merged 8 commits intomasterfrom
elevation-profile-enhancement

Conversation

@Azgaar
Copy link
Copy Markdown
Owner

@Azgaar Azgaar commented Apr 27, 2026

Description

Azgaar and others added 5 commits April 27, 2026 02:50
… formats

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
- Migrate elevation profile logic from `elevation-profile.js` to `elevation-profile.ts`.
- Update references in `rivers-editor.js` and `routes-editor.js` to use the new `ElevationProfile.open` method.
- Remove the old elevation profile script from `index.html`.
- Add necessary imports and type declarations in `global.ts` for new elevation profile functions.
- Ensure proper handling of elevation profile data and rendering in the new controller.

Co-authored-by: Copilot <copilot@github.com>
…ation profile

Co-authored-by: Copilot <copilot@github.com>
@Azgaar Azgaar self-assigned this Apr 27, 2026
Copilot AI review requested due to automatic review settings April 27, 2026 13:36
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 27, 2026

Deploy Preview for afmg ready!

Name Link
🔨 Latest commit b7fbc0c
🔍 Latest deploy log https://app.netlify.com/projects/afmg/deploys/69ef862ba140b80008e70097
😎 Deploy Preview https://deploy-preview-1394--afmg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the elevation profile UI from the legacy public/modules/ui/elevation-profile.js script into a new TypeScript controller, while adding export options and tweaking the elevation chart UI/behavior.

Changes:

  • Replace legacy showElevationProfile(...) with a new window.ElevationProfile.open(...) implemented in src/controllers/elevation-profile.ts.
  • Update the elevation profile dialog UI (curve default, add SVG/PNG export buttons, add a stats readout; remove height scale control).
  • Wire routes/rivers editors to call the new API and remove the legacy script include.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/types/global.ts Adds global type declarations needed by the new TS controller (height/coords/file/zoom/modules helpers).
src/index.html Updates elevation profile controls markup and removes the legacy elevation-profile script include.
src/controllers/index.ts Registers the new elevation profile controller for bundling/loading.
src/controllers/elevation-profile.ts New TS implementation of the elevation profile chart + CSV/SVG/PNG exports and hover interactions.
public/modules/ui/routes-editor.js Switches elevation profile invocation to ElevationProfile.open.
public/modules/ui/rivers-editor.js Switches elevation profile invocation to ElevationProfile.open.
public/modules/ui/elevation-profile.js Removes the legacy implementation.

Comment thread src/types/global.ts
Comment thread src/controllers/elevation-profile.ts
Comment thread src/controllers/elevation-profile.ts Outdated
Comment thread src/controllers/elevation-profile.ts
Comment thread src/controllers/elevation-profile.ts
Comment thread src/types/global.ts
@Azgaar Azgaar merged commit 2549425 into master Apr 27, 2026
7 checks passed
@Azgaar Azgaar deleted the elevation-profile-enhancement branch April 27, 2026 16:04
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.

2 participants