mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
SVG Import: Fix namespacing issues introduced by #984
This commit is contained in:
parent
b71e3a44d9
commit
acb1e408d0
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue