mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Add conditional code to CanvasProvider, with a TODO for implementing functionality for the server.
This commit is contained in:
parent
cf79080682
commit
81461764a5
1 changed files with 5 additions and 0 deletions
|
@ -37,10 +37,15 @@ var CanvasProvider = {
|
|||
}
|
||||
return canvas;
|
||||
} else {
|
||||
//#ifdef BROWSER
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = size.width;
|
||||
canvas.height = size.height;
|
||||
return canvas;
|
||||
//#else // !BROWSER
|
||||
// TODO: Implement for server environments
|
||||
return null;
|
||||
//#endif // !BROWSER
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue