svg-center
v1.0.0
Published
Resize and center an svg element to its contents. Eliminates whitespace, and enables correct rescaling regarding width and height (provided ratio is constant)
Downloads
6
Maintainers
Readme
svg-center
Lets shrink our svg just to the elements being shown within it.
center = require('svg-center')
// shrink a single svg
center.shrink(document.getElementById('svg1'))
// or
// shrink all svgs
center.shrinkall()