equinor / equinor/webviz-subsurface-components

DeckGLMap takes the full viewport

Open
#684 0 comments 0 reactions 0 assignees View on GitHub
bug map-component
Dominant language
TypeScript
Stars
49
Forks
45
Avg merge
1d 8h
Merged PRs (30d)
28

Description

The component does not honor its parent size.
E.g. in the python example if the height is reduced:
```python
wcc.Frame(
style={"flex": 10, "height": "40vh"},
children=[map_obj],
),
```
The resulting render is truncated:
![image](https://user-images.githubusercontent.com/16436291/144591196-9b63d492-1d0a-49cf-aa32-a9fbe9cb8cf2.png)

This seems to be a well known issue with DeckGL and is solvable by setting the nearest parent position to `relative`.
https://stackoverflow.com/questions/60881824/how-to-prevent-deck-gl-layers-from-occupying-entire-viewport

Contributor guide

Open the contributing guide

Research direction

Locate the DeckGLMap component and reproduce the sizing problem using the Python example with a reduced parent height. Inspect how the map is positioned relative to its parent and verify that the rendered map honors the parent dimensions without truncation.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.