Check dimensions on draw, not just on startup.

Previously the container dimensions were checked only once, which
prevented the pie from changing in size as its container was resized.
pull/1/head
David Schnur 13 years ago
parent 715a093316
commit 02c701b057

@ -190,8 +190,6 @@ More detail and specific examples can be found in the included HTML file.
canvas = plot.getCanvas();
target = $(canvas).parent();
options = plot.getOptions();
canvasWidth = plot.getPlaceholder().width();
canvasHeight = plot.getPlaceholder().height();
plot.setData(combine(plot.getData()));
}
}
@ -293,6 +291,9 @@ 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();
ctx = newCtx;
setupPie();

Loading…
Cancel
Save