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;