Mercurial > laserkard
view js-lib/buy3.js @ 85:da4f4f91f8aa laserkard
got three separate Raphael instances
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 25 Jul 2010 22:36:16 -0400 |
parents | |
children | e48424b01e5f |
line wrap: on
line source
1 Buy = (function (){2 var order =3 {color: "black",4 style: "bold",5 quantity: 30,6 content: undefined,7 info: undefined};9 var display;10 var color;11 var style;14 var drawInit = (function (){15 display.rect(1, 1, 338, 213, 20);16 color.rect(1, 1, 50, 50, 10);17 style.rect(1, 1, 10, 10, 5);19 display.print(40, 45, "Robert" , display.getFont('HelveticaNeue', 700), 30);20 display.print(40, 90, "McIntyre" , display.getFont('HelveticaNeue', 800), 30);22 });24 var init = (function () {26 $("#debug").append("init called.");27 display = Raphael("card-display", 340 ,215);28 color = Raphael("color-select", 200, 70);29 style = Raphael("style-select", 200, 70);30 drawInit();31 });35 return {init : init36 };37 })();41 $(document).ready(function() {42 Buy.init();47 });