(c)
| 45 | /** Load the text **/ |
| 46 | this.DOM.appendChild(document.createTextNode(data.text)); |
| 47 | var getColor = function(c){ |
| 48 | if(typeof c === "string"){ |
| 49 | c = parseInt(c); |
| 50 | if(c === NaN){ |
| 51 | c = 0; |
| 52 | } |
| 53 | } |
| 54 | var color = c.toString(16); |
| 55 | while(color.length < 6){ |
| 56 | color = "0" + color; |
| 57 | } |
| 58 | return "#" + color; |
| 59 | }; |
| 60 | this.setTextFormat = function(textFormat){ |
| 61 | this.DOM.style.fontFamily = textFormat.font; |
| 62 | this.DOM.style.fontSize = textFormat.size + "px"; |