Framework agnostic JavaScript library to support responsive applications using Redu canvas.
Two main resolutions are currently supported by Redu Platform:
- 740px width and unlimited height (Default);
- 900px width and unlimited height;
The application running inside the canvas should tell the provider which resolution it prefers. Thanks to the Same Origin Policy, widely implemented by browsers, this job isn't straightforward.
Include the minifiyed (see the dist
folder or the downaload page) version of
this library in the header of your HTML document which is going to be used
as a canvas app.
<script type="text/javascript" src="/javascripts/redu.canvas-0.0.1.min.js"></script>
Initialize the Canvas object stating the dimensions needed by your application.
var canvas = new Redu.Canvas({
width : 900,
height : 1000,
});
That's it. Now, try to open the application inside the canvas. You should see it stretched to accomodate your application.
Here is how your application should look like:
Redu Canvas Apps are just like Facebook apps (like farmville ones) which run inside Redu Educational Platform. It's the best way to deliver a sameless educational experience to end-users.
You can find more information about that on our developers page.