From 93cfb44e91267f3098125ee425d92ce691e26e4e Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Sat, 5 Sep 2009 11:19:42 +0000 Subject: [PATCH] Use global variable xlinkns. Fix tabbing/indentation. git-svn-id: http://svg-edit.googlecode.com/svn/trunk@584 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 3750d76c..36e94185 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1324,8 +1324,7 @@ function BatchCommand(text) { "opacity": cur_shape.opacity / 2 } }); - var xlinkNS="http://www.w3.org/1999/xlink"; - newImage.setAttributeNS(xlinkNS, "href", "images/logo.png") + newImage.setAttributeNS(xlinkns, "href", "images/logo.png") break; case "square": // FIXME: once we create the rect, we lose information that this was a square @@ -2838,9 +2837,8 @@ function BatchCommand(text) { elem.textContent = newValue; elem = canvas.quickClone(elem); } else if (attr == "#href") { - var xlinkNS="http://www.w3.org/1999/xlink"; - elem.setAttributeNS(xlinkNS, "href", newValue); - } + elem.setAttributeNS(xlinkns, "href", newValue); + } else elem.setAttribute(attr, newValue); selectedBBoxes[i] = this.getBBox(elem); // Use the Firefox quickClone hack for text elements with gradients or