add a comment to output SVG saying 'created with SVG-edit - http://svg-edit.googlecode.com/'

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@494 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Pavol Rusnak 2009-08-28 14:39:53 +00:00
parent e2556a6574
commit e64035dc4e
1 changed files with 6 additions and 2 deletions

View File

@ -532,6 +532,8 @@ function SvgCanvas(c)
svgroot.setAttribute("id", "svgroot"); svgroot.setAttribute("id", "svgroot");
svgroot.setAttribute("xmlns", svgns); svgroot.setAttribute("xmlns", svgns);
container.appendChild(svgroot); container.appendChild(svgroot);
var comment = svgdoc.createComment(" created with SVG-edit - http://svg-edit.googlecode.com/ ");
svgroot.appendChild(comment);
var d_attr = null; var d_attr = null;
var started = false; var started = false;
@ -2276,7 +2278,8 @@ function SvgCanvas(c)
defs = defs[0]; defs = defs[0];
} }
else { else {
defs = svgroot.insertBefore( svgdoc.createElementNS(svgns, "defs" ), svgroot.firstChild); // first child is a comment, so call nextSibling
defs = svgroot.insertBefore( svgdoc.createElementNS(svgns, "defs" ), svgroot.firstChild.nextSibling);
} }
return defs; return defs;
}; };
@ -2677,7 +2680,8 @@ function SvgCanvas(c)
var oldParent = t.parentNode; var oldParent = t.parentNode;
var oldNextSibling = t.nextSibling; var oldNextSibling = t.nextSibling;
if (oldNextSibling == selectorManager.selectorParentGroup) oldNextSibling = null; if (oldNextSibling == selectorManager.selectorParentGroup) oldNextSibling = null;
var firstChild = t.parentNode.firstChild; // first child is a comment, so call nextSibling
var firstChild = t.parentNode.firstChild.nextSibling;
if (firstChild.tagName == 'defs') { if (firstChild.tagName == 'defs') {
firstChild = firstChild.nextSibling; firstChild = firstChild.nextSibling;
} }