Removed unnecessary canvas skipPositioning flag.

The primary canvas uses position: absolute while the overlay canvas does
not.  This can cause the two to get out of alignment in rare cases when
floating elements are placed near the plot placeholder.  There doesn't
appear to be any reason why the overlay can't also be
absolutely-positioned, so I've just removed the flag entirely.
pull/1/head
David Schnur 14 years ago
parent fa025fab91
commit e85a190ea9

@ -738,15 +738,13 @@ Licensed under the MIT license.
return devicePixelRatio / backingStoreRatio;
}
function makeCanvas(skipPositioning, cls) {
function makeCanvas(cls) {
var c = document.createElement('canvas');
c.className = cls;
if (!skipPositioning)
$(c).css({ position: 'absolute', left: 0, top: 0 });
$(c).appendTo(placeholder);
$(c).css({ position: 'absolute', left: 0, top: 0 })
.appendTo(placeholder);
// If HTML5 Canvas isn't available, fall back to Excanvas
@ -842,8 +840,8 @@ Licensed under the MIT license.
getCanvasDimensions();
canvas = makeCanvas(true, "flot-base");
overlay = makeCanvas(false, "flot-overlay"); // overlay canvas for interactive features
canvas = makeCanvas("flot-base");
overlay = makeCanvas("flot-overlay"); // overlay canvas for interactive features
reused = false;
}

Loading…
Cancel
Save