mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Let View handle the retrieving of the canvas object.
This commit is contained in:
parent
828c3ae369
commit
14881b8b19
1 changed files with 1 additions and 3 deletions
|
@ -234,10 +234,8 @@ var PaperScript = this.PaperScript = new function() {
|
||||||
// retrieved through PaperScope.get().
|
// retrieved through PaperScope.get().
|
||||||
// If a canvas id is provided, pass it on to the PaperScope
|
// If a canvas id is provided, pass it on to the PaperScope
|
||||||
// so a project is created for it now.
|
// so a project is created for it now.
|
||||||
var canvas = PaperScript.getAttribute(script, 'canvas');
|
|
||||||
canvas = canvas && document.getElementById(canvas);
|
|
||||||
var scope = new PaperScope(script);
|
var scope = new PaperScope(script);
|
||||||
scope.setup(canvas);
|
scope.setup(PaperScript.getAttribute(script, 'canvas'));
|
||||||
if (script.src) {
|
if (script.src) {
|
||||||
// If we're loading from a source, request that first and then
|
// If we're loading from a source, request that first and then
|
||||||
// run later.
|
// run later.
|
||||||
|
|
Loading…
Reference in a new issue