Skip to content

fix: GeoJSON export#1283

Merged
Azgaar merged 3 commits into
Azgaar:masterfrom
SheepFromHeaven:fix/geojson-export
Jan 26, 2026
Merged

fix: GeoJSON export#1283
Azgaar merged 3 commits into
Azgaar:masterfrom
SheepFromHeaven:fix/geojson-export

Conversation

@SheepFromHeaven
Copy link
Copy Markdown
Collaborator

@SheepFromHeaven SheepFromHeaven commented Jan 26, 2026

Description

Type of change

  • Bug fix
  • New feature
  • Refactoring / style
  • Documentation update / chore
  • Other (please describe)

Versioning

  • Version is updated
  • Changed files hash is updated

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 26, 2026

Deploy Preview for afmg ready!

Name Link
🔨 Latest commit 2e9a167
🔍 Latest deploy log https://app.netlify.com/projects/afmg/deploys/697794215089150008d3fd7d
😎 Deploy Preview https://deploy-preview-1283--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.

@SheepFromHeaven SheepFromHeaven changed the title fix: use global vars instead of window. fix: GeoJSON export Jan 26, 2026
@Azgaar Azgaar requested review from Azgaar and Copilot January 26, 2026 16:06
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 attempts to fix GeoJSON export functionality by changing how coordinate conversion functions access global variables. The changes replace indirect access via (window as any) with direct global variable references for mapCoordinates, graphWidth, and graphHeight.

Changes:

  • Modified global variable access in coordinate conversion functions from window properties to direct global references
  • Added TypeScript global variable declarations for mapCoordinates, graphWidth, and graphHeight
  • Added comprehensive unit tests for coordinate conversion functions (getLongitude, getLatitude, getCoordinates)
  • Added GitHub Actions workflow for running unit tests on pull requests

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/utils/index.ts Changed variable access from (window as any).mapCoordinates/graphWidth/graphHeight to direct references
src/utils/commonUtils.ts Added global variable type declarations for the three variables
src/utils/commonUtils.test.ts Added comprehensive unit tests for coordinate conversion functions with edge cases
.github/workflows/unit-tests.yml Added CI workflow for running unit tests on PRs to master branch

Comment thread src/utils/index.ts
Comment thread src/utils/index.ts
Comment thread src/utils/commonUtils.ts
@Azgaar Azgaar merged commit e37fce1 into Azgaar:master Jan 26, 2026
6 checks passed
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.

3 participants