mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +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) {
|
||||
var attr = item.attr('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 {
|
||||
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