Preventing 'changed' events from happening when a new temporary element is added

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

View File

@ -73,7 +73,7 @@ function SvgCanvas(doc)
assignAttributes(shape, data.attr);
cleanupElement(shape);
svgdoc.documentElement.appendChild(shape);
call("changed",shape);
return shape;
}
var svgToString = function(elem, indent) {
@ -352,7 +352,7 @@ function SvgCanvas(doc)
case "fhellipse":
if ((freehand_max_x - freehand_min_x) > 0 &&
(freehand_max_y - freehand_min_y) > 0) {
addSvgElementFromJson({
call("changed",addSvgElementFromJson({
"element": "ellipse",
"attr": {
"cx": (freehand_min_x + freehand_max_x) / 2,
@ -368,13 +368,13 @@ function SvgCanvas(doc)
"stroke-opacity": current_stroke_opacity,
"fill-opacity": current_fill_opacity
}
});
}));
}
break;
case "fhrect":
if ((freehand_max_x - freehand_min_x) > 0 &&
(freehand_max_y - freehand_min_y) > 0) {
addSvgElementFromJson({
call("changed",addSvgElementFromJson({
"element": "rect",
"attr": {
"x": freehand_min_x,
@ -390,7 +390,7 @@ function SvgCanvas(doc)
"stroke-opacity": current_stroke_opacity,
"fill-opacity": current_fill_opacity
}
});
}));
}
break;
}