|
|
|
|
@ -699,15 +699,28 @@
|
|
|
|
|
function constructCanvas() {
|
|
|
|
|
canvasWidth = placeholder.width();
|
|
|
|
|
canvasHeight = placeholder.height();
|
|
|
|
|
|
|
|
|
|
// excanvas hack, if there are any canvases here, whack
|
|
|
|
|
// the state on them manually
|
|
|
|
|
if (window.G_vmlCanvasManager)
|
|
|
|
|
placeholder.find("canvas").each(function () {
|
|
|
|
|
delete this.context_;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
placeholder.html(""); // clear placeholder
|
|
|
|
|
|
|
|
|
|
if (placeholder.css("position") == 'static')
|
|
|
|
|
placeholder.css("position", "relative"); // for positioning labels and overlay
|
|
|
|
|
|
|
|
|
|
if (canvasWidth <= 0 || canvasHeight <= 0)
|
|
|
|
|
throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight;
|
|
|
|
|
|
|
|
|
|
if (window.G_vmlCanvasManager) // excanvas hack, make sure everything is setup
|
|
|
|
|
// excanvas hack, make sure everything is setup
|
|
|
|
|
if (window.G_vmlCanvasManager
|
|
|
|
|
&& !window.G_vmlCanvasManager.inited) {
|
|
|
|
|
window.G_vmlCanvasManager.inited = true;
|
|
|
|
|
window.G_vmlCanvasManager.init_(document);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function makeCanvas(skipPositioning) {
|
|
|
|
|
var c = document.createElement('canvas');
|
|
|
|
|
|