Add conditional code to CanvasProvider, with a TODO for implementing functionality for the server.

This commit is contained in:
Jürg Lehni 2011-04-28 08:48:50 +01:00
parent cf79080682
commit 81461764a5

View file

@ -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
} }
}, },