Removes unused context bindings

This commit is contained in:
Mathias Küsel 2016-01-14 18:17:14 +01:00
parent b756507625
commit 25d6c2f064
8 changed files with 20 additions and 20 deletions

View File

@ -44,7 +44,7 @@
if (helpers.isDatasetVisible(dataset) && dataset.bar) {
++barCount;
}
}, this);
});
return barCount;
},

View File

@ -133,7 +133,7 @@
helpers.each(this.getDataset().metaData, function(point, index) {
point.transition(easingDecimal);
point.draw();
}, this);
});
},

View File

@ -219,7 +219,7 @@
var easingDecimal = ease || 1;
helpers.each(this.getDataset().metaData, function(arc, index) {
arc.transition(easingDecimal).draw();
}, this);
});
},
setHoverStyle: function(arc) {

View File

@ -259,9 +259,9 @@
var easingDecimal = ease || 1;
// Transition Point Locations
helpers.each(this.getDataset().metaData, function(point, index) {
helpers.each(this.getDataset().metaData, function(point) {
point.transition(easingDecimal);
}, this);
});
// Transition and Draw the line
if (this.chart.options.showLines)

View File

@ -195,7 +195,7 @@
var easingDecimal = ease || 1;
helpers.each(this.getDataset().metaData, function(arc, index) {
arc.transition(easingDecimal).draw();
}, this);
});
},
setHoverStyle: function(arc) {

View File

@ -167,7 +167,7 @@
// Transition Point Locations
helpers.each(this.getDataset().metaData, function(point, index) {
point.transition(easingDecimal);
}, this);
});
// Transition and Draw the line
this.getDataset().metaDataset.transition(easingDecimal).draw();

View File

@ -110,14 +110,14 @@
if (this.options.scales.xAxes && this.options.scales.xAxes.length) {
helpers.each(this.options.scales.xAxes, function(xAxisOptions, index) {
xAxisOptions.id = xAxisOptions.id || (defaultXAxisID + index);
}, this);
});
}
if (this.options.scales.yAxes && this.options.scales.yAxes.length) {
// Build the y axes
helpers.each(this.options.scales.yAxes, function(yAxisOptions, index) {
yAxisOptions.id = yAxisOptions.id || (defaultYAxisID + index);
}, this);
});
}
}
},
@ -239,7 +239,7 @@
resetElements: function resetElements() {
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.reset();
}, this);
});
},
update: function update(animationDuration, lazy) {
@ -254,12 +254,12 @@
// Make sure all dataset controllers have correct meta data counts
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.buildOrUpdateElements();
}, this);
});
// This will loop through any data and do the appropriate element update for the type
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.update();
}, this);
});
this.render(animationDuration, lazy);
},
@ -310,7 +310,7 @@
if (helpers.isDatasetVisible(dataset)) {
dataset.controller.draw(ease);
}
}, this);
});
// Finally draw the tooltip
this.tooltip.transition(easingDecimal).draw();
@ -330,9 +330,9 @@
elementsArray.push(element);
return elementsArray;
}
}, this);
});
}
}, this);
});
return elementsArray;
},
@ -361,7 +361,7 @@
if(helpers.isDatasetVisible(dataset)){
elementsArray.push(dataset.metaData[found._index]);
}
}, this);
});
return elementsArray;
},

View File

@ -265,7 +265,7 @@
backgroundColor: active._view.backgroundColor
});
}
}, this);
});
tooltipPosition = this.getAveragePosition(this._active);
tooltipPosition.y = this._active[0]._yScale.getPixelForDecimal(0.5);
@ -330,7 +330,7 @@
ctx.font = helpers.fontString(vm.bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);
helpers.each(vm.beforeBody.concat(vm.afterBody), function(line) {
size.width = Math.max(size.width, ctx.measureText(line).width);
}, this);
});
helpers.each(vm.body, function(line) {
size.width = Math.max(size.width, ctx.measureText(line).width + (this._options.tooltips.mode !== 'single' ? (vm.bodyFontSize + 2) : 0));
}, this);
@ -495,7 +495,7 @@
if (i + 1 === vm.title.length) {
pt.y += vm.titleMarginBottom - vm.titleSpacing; // If Last, add margin, remove spacing
}
}, this);
});
}
},
drawBody: function drawBody(pt, vm, ctx, opacity) {
@ -554,7 +554,7 @@
helpers.each(vm.footer, function(footer) {
ctx.fillText(footer, pt.x, pt.y);
pt.y += vm.footerFontSize + vm.footerSpacing;
}, this);
});
}
},
draw: function draw() {