mirror of
https://github.com/svg/svgo.git
synced 2025-08-06 04:22:39 +03:00
moveGroupAttrsToElems: new transform attribute shouldn't be a reference
This commit is contained in:
@@ -44,10 +44,16 @@ exports.fn = function(item) {
|
|||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
item.content.forEach(function(inner) {
|
item.content.forEach(function(inner) {
|
||||||
|
var attr = item.attr('transform');
|
||||||
if (inner.hasAttr('transform')) {
|
if (inner.hasAttr('transform')) {
|
||||||
inner.attr('transform').value = item.attr('transform').value + ' ' + inner.attr('transform').value;
|
inner.attr('transform').value = attr.value + ' ' + inner.attr('transform').value;
|
||||||
} else {
|
} else {
|
||||||
inner.addAttr(item.attr('transform'));
|
inner.addAttr({
|
||||||
|
'name': attr.name,
|
||||||
|
'local': attr.local,
|
||||||
|
'prefix': attr.prefix,
|
||||||
|
'value': attr.value
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user