As part of my quest to make our sites entirely auto-deployable from a common stack of projects, and based on some help from an esteemed forum member, I now have a component in our UI library that can take a tagPath and auto-generate a diagram with SVGs and ViewCanvas solely from the tag provider.
But the one thing I can't figure out how to do is pre-determine the height and width for the ensemble of components based on the size of content within the SVG. What I want is essentially the dimensions found in a SVG component's viewBox custom property upon embedding a SVG. But I want to calculate the height and width based on the SVG content coming in from a binding.
Does anyone know how Ignition determines the viewBox prop upon embedding a SVG, and if that is exposable at runtime? Or another way for me to determine the dimensions of bound SVG elements?
This would empower me to make this a generic card component that can be called in any context solely with a tagPath parameter.