From 07a6189d2935ea98e929a7f28b3336fb20b85a32 Mon Sep 17 00:00:00 2001 From: Marzell Camenzind Date: Tue, 12 Nov 2013 10:11:50 +0100 Subject: [PATCH] Added ability to resize the plot to a given size. --- jquery.flot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.flot.js b/jquery.flot.js index 96800e2..fc83b2e 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -775,9 +775,9 @@ Licensed under the MIT license. }; }; plot.shutdown = shutdown; - plot.resize = function () { - var width = placeholder.width(), - height = placeholder.height(); + plot.resize = function (width, height) { + width = width || placeholder.width(); + height = height || placeholder.height(); surface.resize(width, height); overlay.resize(width, height); };