Let View handle the retrieving of the canvas object.

This commit is contained in:
Jürg Lehni 2011-08-01 16:23:56 +01:00
parent 828c3ae369
commit 14881b8b19

View file

@ -234,10 +234,8 @@ var PaperScript = this.PaperScript = new function() {
// retrieved through PaperScope.get().
// If a canvas id is provided, pass it on to the PaperScope
// so a project is created for it now.
var canvas = PaperScript.getAttribute(script, 'canvas');
canvas = canvas && document.getElementById(canvas);
var scope = new PaperScope(script);
scope.setup(canvas);
scope.setup(PaperScript.getAttribute(script, 'canvas'));
if (script.src) {
// If we're loading from a source, request that first and then
// run later.