nav tabs on admin dashboard
This commit is contained in:
13
node_modules/svgo/plugins/sortAttrs.js
generated
vendored
13
node_modules/svgo/plugins/sortAttrs.js
generated
vendored
@@ -30,7 +30,8 @@ exports.fn = function(item, params) {
|
||||
|
||||
var attrs = [],
|
||||
sorted = {},
|
||||
orderlen = params.order.length + 1;
|
||||
orderlen = params.order.length + 1,
|
||||
xmlnsOrder = params.xmlnsOrder || 'front';
|
||||
|
||||
if (item.elem) {
|
||||
|
||||
@@ -41,10 +42,12 @@ exports.fn = function(item, params) {
|
||||
attrs.sort(function(a, b) {
|
||||
if (a.prefix != b.prefix) {
|
||||
// xmlns attributes implicitly have the prefix xmlns
|
||||
if (a.prefix == 'xmlns')
|
||||
return -1;
|
||||
if (b.prefix == 'xmlns')
|
||||
return 1;
|
||||
if (xmlnsOrder == 'front') {
|
||||
if (a.prefix == 'xmlns')
|
||||
return -1;
|
||||
if (b.prefix == 'xmlns')
|
||||
return 1;
|
||||
}
|
||||
return a.prefix < b.prefix ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user