Commit 02c701b0 authored by David Schnur's avatar David Schnur

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.
parent 715a0933
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment