nav tabs on admin dashboard
This commit is contained in:
10
node_modules/svgo/plugins/collapseGroups.js
generated
vendored
10
node_modules/svgo/plugins/collapseGroups.js
generated
vendored
@@ -43,17 +43,14 @@ exports.fn = function(item) {
|
||||
|
||||
// non-empty elements
|
||||
if (item.isElem() && !item.isElem('switch') && !item.isEmpty()) {
|
||||
|
||||
item.content.forEach(function(g, i) {
|
||||
|
||||
// non-empty groups
|
||||
if (g.isElem('g') && !g.isEmpty()) {
|
||||
|
||||
// move group attibutes to the single content element
|
||||
if (g.hasAttr() && g.content.length === 1) {
|
||||
var inner = g.content[0];
|
||||
|
||||
if (inner.isElem() && !inner.hasAttr('id') &&
|
||||
if (inner.isElem() && !inner.hasAttr('id') && !g.hasAttr('filter') &&
|
||||
!(g.hasAttr('class') && inner.hasAttr('class')) && (
|
||||
!g.hasAttr('clip-path') && !g.hasAttr('mask') ||
|
||||
inner.isElem('g') && !g.hasAttr('transform') && !inner.hasAttr('transform')
|
||||
@@ -66,6 +63,8 @@ exports.fn = function(item) {
|
||||
inner.addAttr(attr);
|
||||
} else if (attr.name == 'transform') {
|
||||
inner.attr(attr.name).value = attr.value + ' ' + inner.attr(attr.name).value;
|
||||
} else if (inner.hasAttr(attr.name, 'inherit')) {
|
||||
inner.attr(attr.name).value = attr.value;
|
||||
} else if (
|
||||
attrsInheritable.indexOf(attr.name) < 0 &&
|
||||
!inner.hasAttr(attr.name, attr.value)
|
||||
@@ -83,9 +82,6 @@ exports.fn = function(item) {
|
||||
item.spliceContent(i, 1, g.content);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user