Consider using static methods:
// Resize an <SVG> element to match viewportDom.ElementSizer.svgViewport(svg);// Resize canvas to match its parentDom.ElementSizer.canvasParent(canvas);// Resize canvas to match viewportDom.ElementSizer.canvasViewport(canvas); Copy
// Resize an <SVG> element to match viewportDom.ElementSizer.svgViewport(svg);// Resize canvas to match its parentDom.ElementSizer.canvasParent(canvas);// Resize canvas to match viewportDom.ElementSizer.canvasViewport(canvas);
Optional
Sets the 'natural' size of an element. This can also be specified when creating ElementSizer.
Static
Size an SVG element to match viewport
Consider using static methods: