1
0
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:
GreLI
2015-11-08 19:08:03 +03:00
parent 3a7f4ea070
commit 7af242b611
2 changed files with 10 additions and 1 deletions

View File

@ -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);