Skip to content

Instantly share code, notes, and snippets.

@MrJaba
Created June 11, 2009 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrJaba/127772 to your computer and use it in GitHub Desktop.
Save MrJaba/127772 to your computer and use it in GitHub Desktop.
Minimech.Mechs = function(){
//private methods and variables
var canvas = null;
function drawLine(x1 ,y1, x2, y2){
var line = canvas.path({stroke: "#036"}).moveTo(x1, y1).lineTo(x2, y2);
}
//public ones
return {
initialize: function(){
if( $("#canvas").length == 0 ) return false;
//create the canvas
canvas = Raphael("canvas", $("#cavas_container").width(), 250);
var mech_x = $("#mech_image").offset().left
var mech_y = $("#mech_image").offset().top
drawLine( 630, 250, 0, 0 );
},
}
}();
$( Minimech.Mechs.initialize );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment