diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 06ad2251..950f71eb 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -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;