Mercurial > laserkard
comparison 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 |
comparison
equal
deleted
inserted
replaced
84:49d553c19407 | 85:da4f4f91f8aa |
---|---|
1 Buy = (function (){ | |
2 var order = | |
3 {color: "black", | |
4 style: "bold", | |
5 quantity: 30, | |
6 content: undefined, | |
7 info: undefined}; | |
8 | |
9 var display; | |
10 var color; | |
11 var style; | |
12 | |
13 | |
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); | |
18 | |
19 display.print(40, 45, "Robert" , display.getFont('HelveticaNeue', 700), 30); | |
20 display.print(40, 90, "McIntyre" , display.getFont('HelveticaNeue', 800), 30); | |
21 | |
22 }); | |
23 | |
24 var init = (function () { | |
25 | |
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 }); | |
32 | |
33 | |
34 | |
35 return {init : init | |
36 }; | |
37 })(); | |
38 | |
39 | |
40 | |
41 $(document).ready(function() { | |
42 Buy.init(); | |
43 | |
44 | |
45 | |
46 | |
47 }); |