Commit e4aaacc6 authored by olau@iola.dk's avatar olau@iola.dk

Don't redraw if the placeholder loses its dimensions


git-svn-id: https://flot.googlecode.com/svn/trunk@270 1e0a6537-2640-0410-bfb7-f154510ff394
parent dd36a2a9
......@@ -32,8 +32,15 @@ plots, you can just fix the size of their placeholders.
plot.getPlaceholder().resize(onResize);
function onResize() {
var placeholder = plot.getPlaceholder();
// somebody might have hidden us and we can't plot
// when we don't have the dimensions
if (placeholder.width() == 0 || placeholder.height() == 0)
return;
++redrawing;
$.plot(plot.getPlaceholder(), plot.getData(), plot.getOptions());
$.plot(placeholder, plot.getData(), plot.getOptions());
--redrawing;
}
}
......
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