Fixed bug where source couldn't be saved in FF using a group

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@974 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-11-24 14:33:48 +00:00
parent 27064ff8da
commit da09855230
1 changed files with 6 additions and 4 deletions

View File

@ -3916,8 +3916,7 @@ function BatchCommand(text) {
// identify layers
identifyLayers();
selectorManager.update();
canvas.clearSelection();
addCommandToHistory(batchCmd);
call("changed", [svgcontent]);
} catch(e) {
@ -5464,7 +5463,7 @@ function BatchCommand(text) {
// Make sure the expected BBox is returned if the element is a group
var getCheckedBBox = function(elem) {
if(elem.tagName == 'g') {
return canvas.getStrokedBBox(elem.childNodes);
return canvas.getStrokedBBox($(elem).children());
} else {
try {
var bb = elem.getBBox();
@ -5501,7 +5500,7 @@ function BatchCommand(text) {
}
return bb;
} catch(e) { return null; }
} catch(e) { return null; }
}
}
var full_bb;
@ -5510,6 +5509,9 @@ function BatchCommand(text) {
full_bb = getCheckedBBox(this);
});
// This shouldn't ever happen...
if(full_bb == null) return null;
if(elems.length == 1) return full_bb;
var max_x = full_bb.x + full_bb.width;