Fix CI & JShint issues

This commit is contained in:
Evert Timberg 2016-05-28 21:01:10 -04:00
parent da1c51f149
commit 6667832392
2 changed files with 12 additions and 12 deletions

View File

@ -282,10 +282,10 @@ module.exports = function(Chart) {
model.opacity = 1; model.opacity = 1;
var labelColors = [], var labelColors = [],
tooltipPosition = tooltipPosition = getAveragePosition(active); tooltipPosition = getAveragePosition(active);
var tooltipItems = []; var tooltipItems = [];
for (var i = 0, len = active.length; i < len; ++i) { for (i = 0, len = active.length; i < len; ++i) {
tooltipItems.push(createTooltipItem(active[i])); tooltipItems.push(createTooltipItem(active[i]));
} }
@ -601,7 +601,7 @@ module.exports = function(Chart) {
var bodyColor = helpers.color(vm.bodyColor); var bodyColor = helpers.color(vm.bodyColor);
var textColor = bodyColor.alpha(opacity * bodyColor.alpha()).rgbString(); var textColor = bodyColor.alpha(opacity * bodyColor.alpha()).rgbString();
ctx.fillStyle = textColor ctx.fillStyle = textColor;
ctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily); ctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);
// Before Body // Before Body
@ -615,7 +615,7 @@ module.exports = function(Chart) {
helpers.each(vm.beforeBody, fillLineOfText); helpers.each(vm.beforeBody, fillLineOfText);
var drawColorBoxes = body.length > 1; var drawColorBoxes = body.length > 1;
xLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0 xLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0;
// Draw body lines now // Draw body lines now
helpers.each(body, function(bodyItem, i) { helpers.each(body, function(bodyItem, i) {

View File

@ -119,8 +119,8 @@ describe('tooltip tests', function() {
}] }]
})); }));
expect(tooltip._view.x).toBeCloseTo(269, 1); expect(tooltip._view.x).toBeCloseTo(269, 0);
expect(tooltip._view.y).toBeCloseTo(155, 1); expect(tooltip._view.y).toBeCloseTo(155, 0);
}); });
it('Should display in single mode', function() { it('Should display in single mode', function() {
@ -223,8 +223,8 @@ describe('tooltip tests', function() {
labelColors: [] labelColors: []
})); }));
expect(tooltip._view.x).toBeCloseTo(269, 1); expect(tooltip._view.x).toBeCloseTo(269, 0);
expect(tooltip._view.y).toBeCloseTo(312, 1); expect(tooltip._view.y).toBeCloseTo(312, 0);
}); });
it('Should display information from user callbacks', function() { it('Should display information from user callbacks', function() {
@ -372,8 +372,8 @@ describe('tooltip tests', function() {
}] }]
})); }));
expect(tooltip._view.x).toBeCloseTo(216, 1); expect(tooltip._view.x).toBeCloseTo(216, 0);
expect(tooltip._view.y).toBeCloseTo(190, 1); expect(tooltip._view.y).toBeCloseTo(190, 0);
}); });
it('Should display information from user callbacks', function() { it('Should display information from user callbacks', function() {
@ -455,7 +455,7 @@ describe('tooltip tests', function() {
}] }]
})); }));
expect(tooltip._view.x).toBeCloseTo(269, 1); expect(tooltip._view.x).toBeCloseTo(269, 0);
expect(tooltip._view.y).toBeCloseTo(155, 1); expect(tooltip._view.y).toBeCloseTo(155, 0);
}); });
}); });