# HG changeset patch # User Robert McIntyre # Date 1280222062 14400 # Node ID 388344355ebfc4243d127f53b76b70c3ea76d39d # Parent 8a3615df4c18ff3c9f79a261b7de4d86db6283d8 figured out how to scale down main display diff -r 8a3615df4c18 -r 388344355ebf buy3.html --- a/buy3.html Tue Jul 27 03:51:01 2010 -0400 +++ b/buy3.html Tue Jul 27 05:14:22 2010 -0400 @@ -12,7 +12,9 @@
-
+
+
+
diff -r 8a3615df4c18 -r 388344355ebf js-lib/buy3.js --- a/js-lib/buy3.js Tue Jul 27 03:51:01 2010 -0400 +++ b/js-lib/buy3.js Tue Jul 27 05:14:22 2010 -0400 @@ -1,24 +1,3 @@ -// Cards = (function (){ - - -// (function (info paper){ -// info.name -// info.occupation -// info.email -// info.phone - - - - - - -// }); - - - - - - Buy = (function (){ @@ -27,7 +6,7 @@ var Cards = {"bold" : { "name" :(function (text, display){ - return display.print(10,10,text,helvetica, 25).attr( + return display.print(10,20,text,helvetica, 25).attr( {"fill" : "#0F0"});}), "email" : (function (text, paper){ return paper.print(50,50,text,helvetica_I,40).attr( @@ -90,12 +69,14 @@ var display; var color; - var style; + var style = {}; var helvetica; var helvetica_I; var state_map = { - green : {ref : null, + bold : {ref : null}, + + green : {ref : null, offState : {"fill" : "#030", "scale": 1} , onState : {"fill" : "#0F0", "scale": 1}}, red : {ref : null, @@ -143,23 +124,39 @@ if ($(this).val() == $(this).attr('title')){ $(this).val('');}})})}); + - + + var style_init = (function (){ + state_map["bold"] = style.bold.set(); + //var yyy = Cards.bold.name("Ru", style.bold); + + //for each (var item in yyy.items) {item.scale(0.5, 0.5);} +// for (var letter in yyy) { +// letter.scale(0.5,0.5);} + + state_map["bold"].push(Cards.bold.name("Robert", style.bold)); + state_map["bold"].attr({"fill" : "red"}); //.scale(0.5, 0.5, 0, 0); + state_map["bold"].scale(0.03, 0.03, 0 , 0); + + }); + var init = (function () { display = Raphael("card-display", 340 ,215); color = Raphael("color-select", 300, 100); - style = Raphael("style-select", 200, 70); + style.bold = Raphael("bold", 100, 100); + //style = Raphael("style-select", 200, 70); helvetica = display.getFont('HelveticaNeue', 700); helvetica_I = display.getFont('HelveticaNeue', 800); - color_select_init(); display_init(); card_init(); text_entry_init(); key_handling(); + style_init(); update(); });