Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CB-4504 transform coordinates according to the chosen srid #2331

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

devnaumov
Copy link
Member

No description provided.

@devnaumov devnaumov self-assigned this Jan 24, 2024
@@ -23,9 +23,11 @@
"@cloudbeaver/core-sdk": "~0.1.0",
"@cloudbeaver/core-ui": "~0.1.0",
"@cloudbeaver/plugin-data-viewer": "~0.1.0",
"@types/proj4": "^2.5.5",
Copy link
Member

Choose a reason for hiding this comment

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

please move types to devDependencies

case 3857:
return 'EPSG3857';
return 'EPSG:3857';
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont like this alien symbols. Lets move it to consts with meaning name

Copy link
Member

Choose a reason for hiding this comment

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

Screenshot 2024-01-30 at 11 01 40 AM it's code and you can google it, i don't agree that we need to move it to const (it will be looking like `const EPSG3857 = 'EPSG:3857'`)

Copy link
Member

Choose a reason for hiding this comment

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

moreover number we get from server and it can by typed with gql enum but it seems no sense for it (again it's not a random number it's code)

const activeElements = selection.getActiveElements();
const firstActiveElement = activeElements[0];
const firstActiveCell = firstActiveElement ? gis.getCellValue(firstActiveElement) : null;
const initialCrs: CrsKey = firstActiveCell?.srid ? getCrsKey(firstActiveCell.srid) : 'EPSG:3857';
Copy link
Contributor

Choose a reason for hiding this comment

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

no magic numbers also

Copy link
Member

Choose a reason for hiding this comment

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

this one can be moved to const DEFAULT_CRS = ...

@devnaumov devnaumov merged commit cd7ffe6 into devel Jan 30, 2024
2 of 3 checks passed
@serge-rider serge-rider deleted the CB-4504-gis-coordinates branch February 21, 2024 11:07
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.

4 participants