-
Notifications
You must be signed in to change notification settings - Fork 42
feat: per-layer bounding box tracking with removal support #2573
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
base: master
Are you sure you want to change the base?
Conversation
rubenthoms
commented
Jun 6, 2025
- Replaces global bounding box reducer with per-layer tracking
- Automatically recomputes unioned bounding box via useMemo
- Adds debounced cleanup effect to remove bounding boxes for unmounted layers
- Adds Storybook story to demonstrate dynamic camera adjustment on add/remove
- Replaces global bounding box reducer with per-layer tracking - Automatically recomputes unioned bounding box via useMemo - Adds debounced cleanup effect to remove bounding boxes for unmounted layers - Adds Storybook story to demonstrate dynamic camera adjustment on add/remove
The use case for us is that data is retrieved asynchronously per data type. Viewers component issues 2 GraphQL calls to retrieve faults and wells. This means for webviz, there are 3 rendering steps:
The current implementation was driven by the following rationale (but implementation could be poor/wrong ;)):
As you noticed, in case 1 does only grow the bounding box. This can be discussed (actually, I don't really mind, since our use case does only add data due to async fetching). Note: I did not yet review the PR to see its impact. I just wanted to explain the current behavior. |
@w1nklr Thanks for the detailed explanation. I see your point with case 2 and that makes total sense. Our use case is that we might change fields in between. Hence, the total bounding box is becoming very large, respecting irrelevant/outdated data. I think our main concern is that |