-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: map refactoring #1837
Merged
Merged
feat: map refactoring #1837
Commits on Dec 15, 2023
-
Refactor Map component to remove numerous useEffect
Main motivation is to fix wrong view state computed when first rendering is done with hidden flag. First reproduced by application with tabbed layout where all the tabs are rendered using hidden flag. This use case has been added to the storybook to demonstrate the issue, along with a 'triggerHome' control (in a previous PR). The current PR brings: - onResize() function to handle resizing - use a React reducer to handle Z scaling Add support for PageUp/PageDown and Shift modifier - use a React reducer to compute the global 3D bounding box from the reportBoundingBox callback of the layers - introduce a ViewController class to generate the DeckGL views and viewState This brings all the computations in one place/one step by providing state change allowing to fine-tune the computations - use bounding box from the 'cameraPosition' (if set as zoom field) instead of the data bounding box Fixes: - initial viewState is correct, even when rendered with 'hidden' flag set to true - triggerHome now respects current zScale In the end, the final implementation drops down to 6 React useEffect, from the 16 initial ones !
Configuration menu - View commit details
-
Copy full SHA for 9ac4cce - Browse repository at this point
Copy the full SHA 9ac4cceView commit details -
Configuration menu - View commit details
-
Copy full SHA for da2c97a - Browse repository at this point
Copy the full SHA da2c97aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d5aa6e - Browse repository at this point
Copy the full SHA 5d5aa6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7c90d9 - Browse repository at this point
Copy the full SHA d7c90d9View commit details
Commits on Dec 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b9a997e - Browse repository at this point
Copy the full SHA b9a997eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f3308e - Browse repository at this point
Copy the full SHA 4f3308eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d631f95 - Browse repository at this point
Copy the full SHA d631f95View commit details -
Fix Map tests (both crash and snapshots).
Add script to debug jest tests
Configuration menu - View commit details
-
Copy full SHA for bf38d52 - Browse repository at this point
Copy the full SHA bf38d52View commit details
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.