From bf01441dc67895b433a8b921f34572d373ca491c Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Mon, 12 Jan 2009 12:23:43 +0000 Subject: [PATCH] Check position of placeholder before setting it git-svn-id: https://flot.googlecode.com/svn/trunk@125 1e0a6537-2640-0410-bfb7-f154510ff394 --- NEWS.txt | 2 ++ jquery.flot.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.txt b/NEWS.txt index efd7d40..8f6469c 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -48,6 +48,8 @@ Bug fixes: (reported by Khurram). - Fixed a bug with returning y2 values in the selection event (fix by exists, issue 75). +- Only set position relative on placeholder if it hasn't already a + position different from static (reported by kyberneticist, issue 95). Flot 0.5 diff --git a/jquery.flot.js b/jquery.flot.js index 658b5d7..969cb14 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -330,7 +330,8 @@ canvasWidth = target.width(); canvasHeight = target.height(); target.html(""); // clear target - target.css("position", "relative"); // for positioning labels and overlay + if (target.css("position") == 'static') + target.css("position", "relative"); // for positioning labels and overlay if (canvasWidth <= 0 || canvasHeight <= 0) throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight;