diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-06 22:08:38 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-06 22:08:38 +0100 |
commit | 2702ceb26d3021720f3ff979bcf5f46fc65699e9 (patch) | |
tree | cf24afdc5ca280e161347512469f48ba6c80dc8e /src/svg.js | |
parent | 042edca2e4e25a293c8d3a55794793636af5b910 (diff) | |
download | svg.js-2702ceb26d3021720f3ff979bcf5f46fc65699e9.tar.gz svg.js-2702ceb26d3021720f3ff979bcf5f46fc65699e9.zip |
svgjs now saves crucial data in the dom (fixes #369 again)
Diffstat (limited to 'src/svg.js')
-rw-r--r-- | src/svg.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -14,6 +14,7 @@ var SVG = this.SVG = function(element) { SVG.ns = 'http://www.w3.org/2000/svg' SVG.xmlns = 'http://www.w3.org/2000/xmlns/' SVG.xlink = 'http://www.w3.org/1999/xlink' +SVG.svgjs = 'http://svgjs.com/svgjs' // Svg support test SVG.supported = (function() { @@ -116,6 +117,9 @@ SVG.adopt = function(node) { if (element instanceof SVG.Doc) element.namespace().defs() + // pull svgjs data from the dom (getAttributeNS doesn't work in html5) + element.setData(JSON.parse(node.getAttribute('svgjs:data')) || {}) + return element } |