mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -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;
|
return canvas;
|
||||||
} else {
|
} else {
|
||||||
|
//#ifdef BROWSER
|
||||||
var canvas = document.createElement('canvas');
|
var canvas = document.createElement('canvas');
|
||||||
canvas.width = size.width;
|
canvas.width = size.width;
|
||||||
canvas.height = size.height;
|
canvas.height = size.height;
|
||||||
return canvas;
|
return canvas;
|
||||||
|
//#else // !BROWSER
|
||||||
|
// TODO: Implement for server environments
|
||||||
|
return null;
|
||||||
|
//#endif // !BROWSER
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue