Fixed Issue 508: Resizing of <g> with <use> causes problems

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1800 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2010-10-13 19:36:47 +00:00
parent 4d01563caf
commit 65020c53c7
1 changed files with 4 additions and 3 deletions

View File

@ -2231,12 +2231,13 @@ var getStrokedBBox = this.getStrokedBBox = function(elems) {
}
if(!good_bb) {
// Must use clone else FF freaks out
var clone = elem.cloneNode(true);
var g = document.createElementNS(svgns, "g");
var parent = elem.parentNode;
parent.replaceChild(g, elem);
g.appendChild(elem);
parent.appendChild(g);
g.appendChild(clone);
bb = g.getBBox();
parent.insertBefore(elem,g);
parent.removeChild(g);
}