ravel.js

Ravel.js is a utility wrapper of javascript code distributed with the javascript Ravel widget that helps setting up a ravel and connecting it to a database. It is open source, so may be useful as a source of studying the Ravel API.

newRavel(canvasId)
returns a newly constructed RavelCanvasDatacube attached to the HTML canvas element with id canvasId. Mouse and keyboard event handlers are wired up.

ravel.onRedraw() is called every time the ravel is rerendered, allowing the ravel output data to be collected and processed.

setTable(name, ravel)
populates the RavelCanvasDataCube ravel from the table name using AJAX. ravel.dataLoadHook() is called once data has finished loading.
populateTableSelector(selectorId)
populates an HTML select element with a list of table available in the database.
buildDbQuery(table,ravel)
build the query part of an AJAX call to mySqlService.php that returns just the hyperslice represented by ravel, against the database table.



Ravelation Pty Ldt