Skip to content

Commit

Permalink
eslint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
drom committed Feb 22, 2024
1 parent 5a72dfe commit f51de8c
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const labelArr = (desc, opt) => {
}, {
field: e.name,
style: 'fill-opacity:0.1' + typeStyle(e.type)
}),
}),
e.rect !== undefined ? e.rect : {}
)]);
}
Expand Down Expand Up @@ -325,7 +325,7 @@ const cage = (desc, opt) => {
}
}
return res;
} /* eslint complexity: [1, 23] */;
} /* eslint complexity: [1, 30] */;

const lane = (desc, opt) => {
const {index, vspace, hspace, margin, hflip, lanes, compact, label} = opt;
Expand All @@ -349,11 +349,9 @@ const lane = (desc, opt) => {
let txt = index;
if (typeof lab === 'string') {
txt = lab;
} else
if (typeof lab === 'number') {
} else if (typeof lab === 'number') {
txt += lab;
} else
if (typeof lab === 'object') {
} else if (typeof lab === 'object') {
txt = lab[index] || txt;
}
res.push(['g', {'text-anchor': 'end'},
Expand All @@ -366,11 +364,9 @@ const lane = (desc, opt) => {
let txt = index;
if (typeof lab === 'string') {
txt = lab;
} else
if (typeof lab === 'number') {
} else if (typeof lab === 'number') {
txt += lab;
} else
if (typeof lab === 'object') {
} else if (typeof lab === 'object') {
txt = lab[index] || txt;
}
res.push(['g', {'text-anchor': 'start'},
Expand Down

0 comments on commit f51de8c

Please sign in to comment.