Fit SVG File to Button

Preset a Button width = height, then call SVG file to fit into that Button, and be centered. Uses getBBox() method and Viewbox attribute. It will fill the Button's width and/or height, maintaining its aspect ratio.
Button width/height:px.   Load SVG File: Javascript: