From 14881b8b1997e9a50d9df0a0fdaec268a9f91b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 1 Aug 2011 16:23:56 +0100 Subject: [PATCH] Let View handle the retrieving of the canvas object. --- src/core/PaperScript.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/PaperScript.js b/src/core/PaperScript.js index d9b91dda..3e1edb6d 100644 --- a/src/core/PaperScript.js +++ b/src/core/PaperScript.js @@ -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.