SVG Import: Fix namespacing issues introduced by #984

This commit is contained in:
Jürg Lehni 2016-02-19 23:30:54 +01:00
parent b71e3a44d9
commit acb1e408d0

View file

@ -18,8 +18,8 @@
var SvgElement = new function() {
// SVG related namespaces
var svg = 'http://www.w3.org/2000/svg',
xmlns = 'http://www.w3.org/2000/xmlns/',
xlink = 'http://www.w3.org/1999/xlink/',
xmlns = 'http://www.w3.org/2000/xmlns',
xlink = 'http://www.w3.org/1999/xlink',
// Mapping of attribute names to required namespaces:
attributeNamespace = {
href: xlink,
@ -47,7 +47,7 @@ var SvgElement = new function() {
if (typeof value === 'number' && formatter)
value = formatter.number(value);
if (namespace) {
node.setAttributeNS(namespace, name, value);
node.setAttributeNS(namespace + '/', name, value);
} else {
node.setAttribute(name, value);
}