Fixed more of issue 716
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1890 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -6554,11 +6554,6 @@ var convertToGroup = this.convertToGroup = function(elem) {
|
|||||||
ts = $elem.attr('transform');
|
ts = $elem.attr('transform');
|
||||||
var pos = $elem.attr(['x','y']);
|
var pos = $elem.attr(['x','y']);
|
||||||
|
|
||||||
// if(ts.length) {
|
|
||||||
//
|
|
||||||
// ts += " ";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Not ideal, but works
|
// Not ideal, but works
|
||||||
ts += "translate(" + (pos.x || 0) + "," + (pos.y || 0) + ")";
|
ts += "translate(" + (pos.x || 0) + "," + (pos.y || 0) + ")";
|
||||||
|
|
||||||
@@ -6578,14 +6573,23 @@ var convertToGroup = this.convertToGroup = function(elem) {
|
|||||||
g.appendChild(childs[i].cloneNode(true));
|
g.appendChild(childs[i].cloneNode(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
// while (elem.hasChildNodes())
|
// Duplicate the gradients for Gecko, since they weren't included in the <symbol>
|
||||||
// g.appendChild(elem.firstChild.cloneNode(true));
|
if(svgedit.browsersupport.isGecko()) {
|
||||||
|
var dupeGrads = $(findDefs()).children('linearGradient,radialGradient,pattern').clone();
|
||||||
|
$(g).append(dupeGrads);
|
||||||
|
}
|
||||||
|
|
||||||
if (ts)
|
if (ts)
|
||||||
g.setAttribute("transform", ts);
|
g.setAttribute("transform", ts);
|
||||||
|
|
||||||
var parent = elem.parentNode;
|
var parent = elem.parentNode;
|
||||||
|
|
||||||
uniquifyElems(g);
|
uniquifyElems(g);
|
||||||
|
|
||||||
|
// Put the dupe gradients back into <defs> (after uniquifying them)
|
||||||
|
if(svgedit.browsersupport.isGecko()) {
|
||||||
|
$(findDefs()).append( $(g).find('linearGradient,radialGradient,pattern') );
|
||||||
|
}
|
||||||
|
|
||||||
// now give the g itself a new id
|
// now give the g itself a new id
|
||||||
g.id = getNextId();
|
g.id = getNextId();
|
||||||
|
|||||||
Reference in New Issue
Block a user