diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-02-11 15:29:23 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-03-01 02:06:05 +0100 |
commit | 64a5c17b95393c0914670b1b9e2c8b4d63707968 (patch) | |
tree | d474bc95c101a44c91ee0ae8f7ccd73bb3acb48d /src/svg.js | |
parent | 3d1b02f878756dece8a20c0110497ccc70b4f363 (diff) | |
download | svg.js-64a5c17b95393c0914670b1b9e2c8b4d63707968.tar.gz svg.js-64a5c17b95393c0914670b1b9e2c8b4d63707968.zip |
merge SVG.Doc and SVG.Nested. Add isRoot() method, update doc methods to decide between doc and nested
Diffstat (limited to 'src/svg.js')
-rw-r--r-- | src/svg.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -87,9 +87,9 @@ SVG.adopt = function (node) { var element // adopt with element-specific settings - if (node.nodeName === 'svg') { - element = node.parentNode instanceof window.SVGElement ? new SVG.Nested(node) : new SVG.Doc(node) - } else if (node.nodeName === 'linearGradient' || node.nodeName === 'radialGradient') { + if (node.nodeName == 'svg') + element = new SVG.Doc(node) + else if (node.nodeName === 'linearGradient' || node.nodeName === 'radialGradient') element = new SVG.Gradient(node) } else if (SVG[capitalize(node.nodeName)]) { element = new SVG[capitalize(node.nodeName)](node) |