Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created June 4, 2011 22:51
Show Gist options
  • Save wchristian/1008456 to your computer and use it in GitHub Desktop.
Save wchristian/1008456 to your computer and use it in GitHub Desktop.
function render_canvas(id) {
var target = $('#' + id);
var x = target.offset().left;
var y = target.offset().top;
var width = target.innerWidth();
var height = target.innerHeight();
var r = Raphael( x, y, width, height );
r.path("M0 0L"+width+" "+height);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment