From 6c2958278f02533e1a92305c5e15280bc6da2400 Mon Sep 17 00:00:00 2001 From: Vidar Hokstad Date: Fri, 12 Jun 2009 06:45:37 +0000 Subject: [PATCH] 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 --- editor/svgcanvas.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index d5a839eb..7b393c62 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -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);