Skip to content

Commit

Permalink
Prefix canvas classes with "flot-" to prevent clashes, mostly a
Browse files Browse the repository at this point in the history
problem with .overlay (reported by bcraysie/Bob Cravens, issue 540)
  • Loading branch information
OleLaursen committed Jun 3, 2011
1 parent 2c8fc1a commit e55b5b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS.txt
Expand Up @@ -11,6 +11,8 @@ the canvas API (this doesn't affect IE); if this is a problem, either
continue using an older version of Flot or try an emulation helper
such as canvas-text or Flashcanvas.

The base and overlay canvas are now using the CSS classes "flot-base"
and "flot-overlay" to prevent accidental clashes (issue 540).


Changes:
Expand Down
8 changes: 4 additions & 4 deletions jquery.flot.js
Expand Up @@ -735,8 +735,8 @@

function setupCanvases() {
var reused,
existingCanvas = placeholder.children("canvas.base"),
existingOverlay = placeholder.children("canvas.overlay");
existingCanvas = placeholder.children("canvas.flot-base"),
existingOverlay = placeholder.children("canvas.flot-overlay");

if (existingCanvas.length == 0 || existingOverlay == 0) {
// init everything
Expand All @@ -750,8 +750,8 @@

getCanvasDimensions();

canvas = makeCanvas(true, "base");
overlay = makeCanvas(false, "overlay"); // overlay canvas for interactive features
canvas = makeCanvas(true, "flot-base");
overlay = makeCanvas(false, "flot-overlay"); // overlay canvas for interactive features

reused = false;
}
Expand Down

0 comments on commit e55b5b4

Please sign in to comment.