Added way of changing the prefix used for id's of the elements

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@110 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Vidar Hokstad 2009-06-12 06:45:37 +00:00
parent 5b83ef6e98
commit 6c2958278f
1 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,7 @@ function SvgCanvas(c)
var container = c;
var svgns = "http://www.w3.org/2000/svg";
var idprefix = "svg_";
var svgdoc = c.ownerDocument;
var svgroot = svgdoc.createElementNS(svgns, "svg");
svgroot.setAttribute("width", 640);
@ -41,7 +42,7 @@ function SvgCanvas(c)
// private functions
var getId = function() {
return "svg_"+obj_num;
return idprefix+obj_num;
}
var call = function(event, arg) {
@ -692,6 +693,10 @@ function SvgCanvas(c)
events[event] = f;
}
this.setIdPrefix = function(p) {
idprefix = p;
}
this.getFontFamily = function() {
return current_font_family;
}
@ -739,6 +744,7 @@ function SvgCanvas(c)
}
}
>>>>>>> .r109
$(container).mouseup(mouseUp);
$(container).mousedown(mouseDown);
$(container).mousemove(mouseMove);