JavaScript animation engine
Use built-in get attribute function for svg viewport
Julian Garnier815944819d4b
diff --git a/src/index.js b/src/index.jsindex 6d7365a6..6536bc83 100644--- a/src/index.js+++ b/src/index.js@@ -577,7 +577,7 @@ function getParentSvg(pathEl, svgData) {const svg = svgData || {};const parentSvgEl = svg.el || getParentSvgEl(pathEl);const rect = parentSvgEl.getBoundingClientRect();- const viewBoxAttr = parentSvgEl.getAttribute('viewBox');+ const viewBoxAttr = getAttribute(parentSvgEl, 'viewBox');const width = rect.width;const height = rect.height;const viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(' ') : [0, 0, width, height]);