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

Fixed zoom for view with axes #976

Closed
wants to merge 5 commits into from

Conversation

shadab-skhan
Copy link
Contributor

No description provided.

@shadab-skhan shadab-skhan self-assigned this May 6, 2022
@@ -403,7 +403,7 @@ export const Axes = MinimalTemplate.bind({});
Axes.args = {
id: "axes",
layers: [axes, meshMapLayer, north_arrow_layer],
bounds: [432150, 6475800, 439400, 6481500],
bounds: [432205, 6475078, 437720, 6481113],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This bound should be same as axis bounds.
Ideally, project bounds should be calculated based on data bounds of all the layers.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have an issue for automatically calculating the bounds (#924), but until we have that in place, then I think using the bounds itself to set the initial viewport is the best solution.

@shadab-skhan shadab-skhan requested a review from hkfb May 6, 2022 11:41
@shadab-skhan shadab-skhan added bug Something isn't working duplicate This issue or pull request already exists AspenTech Task owned by AspenTech map-component Issues related to the map component. and removed duplicate This issue or pull request already exists labels May 6, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 10, 2022

Codecov Report

Merging #976 (b743eae) into master (ee29a78) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #976      +/-   ##
==========================================
- Coverage   42.90%   42.87%   -0.04%     
==========================================
  Files         116      116              
  Lines        3801     3799       -2     
  Branches      716      716              
==========================================
- Hits         1631     1629       -2     
  Misses       2147     2147              
  Partials       23       23              
Impacted Files Coverage Δ
...ct/src/lib/components/DeckGLMap/components/Map.tsx 56.59% <100.00%> (ø)
...t/src/lib/components/DeckGLMap/utils/fit-bounds.js 66.66% <100.00%> (-1.91%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@shadab-skhan shadab-skhan requested a review from nilscb May 11, 2022 06:21
@hkfb
Copy link
Collaborator

hkfb commented May 11, 2022

What is the problem we are solving with this? That the initial viewport is too small when the axes are shown?

We have an issue for automatically calculating the bounds (#924), but until we have that in place, then I think using the bounds itself to set the initial viewport is the best solution.

@shadab-skhan
Copy link
Contributor Author

Before:
image

After:
image

This change only corrects the bounds of storybook example for axes story.

@@ -403,7 +403,7 @@ export const Axes = MinimalTemplate.bind({});
Axes.args = {
id: "axes",
layers: [axes, meshMapLayer, north_arrow_layer],
bounds: [432150, 6475800, 439400, 6481500],
bounds: [432205, 6475078, 437720, 6481113],
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have an issue for automatically calculating the bounds (#924), but until we have that in place, then I think using the bounds itself to set the initial viewport is the best solution.

@shadab-skhan
Copy link
Contributor Author

Discarding PR

@shadab-skhan shadab-skhan deleted the bounds branch May 25, 2022 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AspenTech Task owned by AspenTech bug Something isn't working map-component Issues related to the map component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants