Removed unnecessary plugin-global variables.

The canvasWidth, canvasHeight, legendWidth and legendHeight variables
existed only to share data between the setupPie and draw functions.  Now
that setupPie has been folded into draw, they're no longer necessary.
pull/1/head
David Schnur 13 years ago
parent 6d70144d5e
commit 55864254d2

@ -68,13 +68,10 @@ More detail and specific examples can be found in the included HTML file.
function init(plot) {
var canvas = null,
canvasWidth = 0,
canvasHeight = 0,
target = null,
maxRadius = null,
centerLeft = null,
centerTop = null,
legendWidth = 0,
processed = false,
raw = false,
ctx = null;
@ -268,13 +265,12 @@ More detail and specific examples can be found in the included HTML file.
return; // if no series were passed
}
canvasWidth = plot.getPlaceholder().width();
canvasHeight = plot.getPlaceholder().height();
var canvasWidth = plot.getPlaceholder().width(),
canvasHeight = plot.getPlaceholder().height(),
legendWidth = target.children().filter(".legend").children().width() || 0;
ctx = newCtx;
legendWidth = target.children().filter(".legend").children().width() || 0;
// calculate maximum radius and center point
maxRadius = Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2;

Loading…
Cancel
Save