Fxed liniting issues.

This commit is contained in:
Abhijeet Pathak
2020-06-20 18:39:19 +05:30
parent 5f56db6f6e
commit e515c7beb1

View File

@@ -83,7 +83,6 @@ export const draw = function(text, id) {
function taskCompare(a, b) { function taskCompare(a, b) {
const taskA = a.startTime; const taskA = a.startTime;
const taskB = b.startTime; const taskB = b.startTime;
let result = 0; let result = 0;
if (taskA > taskB) { if (taskA > taskB) {
result = 1; result = 1;
@@ -136,7 +135,9 @@ export const draw = function(text, id) {
.append('rect') .append('rect')
.attr('x', 0) .attr('x', 0)
.attr('y', function(d, i) { .attr('y', function(d, i) {
return d.order * theGap + theTopPad - 2; // Ignore the incoming i value and use our order instead
i = d.order;
return i * theGap + theTopPad - 2;
}) })
.attr('width', function() { .attr('width', function() {
return w - conf.rightPadding / 2; return w - conf.rightPadding / 2;
@@ -177,7 +178,9 @@ export const draw = function(text, id) {
return timeScale(d.startTime) + theSidePad; return timeScale(d.startTime) + theSidePad;
}) })
.attr('y', function(d, i) { .attr('y', function(d, i) {
return d.order * theGap + theTopPad; // Ignore the incoming i value and use our order instead
i = d.order;
return i * theGap + theTopPad;
}) })
.attr('width', function(d) { .attr('width', function(d) {
if (d.milestone) { if (d.milestone) {
@@ -280,7 +283,9 @@ export const draw = function(text, id) {
} }
}) })
.attr('y', function(d, i) { .attr('y', function(d, i) {
return d.order * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad; // Ignore the incoming i value and use our order instead
i = d.order;
return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
}) })
.attr('text-height', theBarHeight) .attr('text-height', theBarHeight)
.attr('class', function(d) { .attr('class', function(d) {