cruise-automation / webviz

web-based visualization libraries
https://webviz.io/
Apache License 2.0
2.01k stars 408 forks source link

Wrapping an element around WorldView component causes infinite increase in height #205

Open spjy opened 4 years ago

spjy commented 4 years ago

Whenever I wrap an HTML element around the WorldView component, it infinitely increases its height. I am forced to set a fixed height as a result.

See https://codesandbox.io/s/relaxed-sun-tqxk3.

vidaaudrey commented 4 years ago

Hi @spjy that's a known issue. For now, you could try applying height: "100%" to the Worldview wrapper div to make sure by default Worldview fills up the whole area. https://codesandbox.io/s/quizzical-kalam-ducme

spjy commented 4 years ago

Right, that is what I am doing now; however that is a band aid solution and is also impractical in my case as I have a wrapper component that requires block level elements above it as well.

jtbandes commented 4 years ago

Can you describe more about how you expect the Worldview component should be sized in your case? Is something constraining its size from the parent down, or how do you expect it to choose its size?

(FYI the issue is a side effect of how we're using react-container-dimensions inside Worldview)

spjy commented 4 years ago

I expect it to be sized based on its immediate parent container.