Merged
Conversation
… formats Co-authored-by: Copilot <copilot@github.com>
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>
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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 newwindow.ElevationProfile.open(...)implemented insrc/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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description