mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Fixed transform moving around the clip. Fixes #446
This commit is contained in:
@ -39,6 +39,7 @@ exports.fn = function(item) {
|
||||
|
||||
var intersection = {},
|
||||
hasTransform = false,
|
||||
hasClip = item.hasAttr('clip-path'),
|
||||
intersected = item.content.every(function(inner) {
|
||||
if (inner.isElem() && inner.hasAttr()) {
|
||||
if (!Object.keys(intersection).length) {
|
||||
@ -62,7 +63,7 @@ exports.fn = function(item) {
|
||||
|
||||
for (var name in intersection) {
|
||||
|
||||
if (!allPath || name !== 'transform') {
|
||||
if (!allPath && !hasClip || name !== 'transform') {
|
||||
|
||||
g.removeAttr(name);
|
||||
|
||||
|
Reference in New Issue
Block a user