bumbeishvili / org-chart

Highly customizable org chart. Integrations available for Angular, React, Vue
https://stackblitz.com/edit/web-platform-o5t1ha
MIT License
927 stars 330 forks source link

SVG height not updating on resize? #416

Open PatrikHampel opened 5 months ago

PatrikHampel commented 5 months ago

When I resize the container, the height of the chart is not getting updated. I see that in the resize callback only the width is being updated. Is that intentional?

d3.select(window).on(`resize.${attrs.id}`, () => {
    const containerRect = d3.select(attrs.container).node().getBoundingClientRect();
    attrs.svg.attr('width', containerRect.width)
});
bumbeishvili commented 5 months ago

Yes, it's intentional