visjs / vis-network

:dizzy: Display dynamic, automatically organised, customizable network views.
https://visjs.github.io/vis-network/
Apache License 2.0
2.99k stars 365 forks source link

Flexbox + auto-resize making canvas grow infinitely #2156

Open radagasus opened 4 months ago

radagasus commented 4 months ago

When trying to make a network container fill the remainder of a wrapper container using flexbox properties, whilst also using autoResize: true, the canvas on which the network is drawn keeps growing in height. A minimal example can be found at https://codepen.io/radagasus/pen/zYXgjdN. Anything I can do to fix this problem?

radagasus commented 4 months ago

The temporary fix provided in this other issue can be tailored to my situation to fix the problem. This means no flex-box properties and dynamic resize of the network container based on resizing events (ResizeObserver).