This allows us to reuse the canvas elements without having to retain the
rest of the Canvas object, which should really be reset when the plot is
reconstructed. It's also a little simpler, and the Canvas constructor
just feels like the right place for this code.
thrownewError("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");
// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas
thrownewError("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");
}
}
}
varcontext=element.getContext("2d");
this.context=context;
this.element=element;
varcontext=this.context=element.getContext("2d");
// Determine the screen's ratio of physical to device-independent
// pixels. This is the ratio between the canvas width that the browser
@ -1151,54 +1155,32 @@ Licensed under the MIT license.