Skip to content
Browse files

making pixels the only unit possible do font size

  • Loading branch information...
1 parent 9a389f8 commit 3d728853249d5e895f5614b1a45b105b69e59771 @HugoLnx HugoLnx committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/window.js
View
6 core/window.js
@@ -150,16 +150,16 @@ Window.prototype = {
* @method setText
* @param {String} text Text.Put \n to skip a line
* @param (optional) {Object} text properties:<br />
- size: {String} The size of text. For example: "18px"<br />
+ size: {Number} The size of text. For example: 18<br />
font: {String} The font of text. For example: "Arial"<br />
color: {String} The color of text. For example: "#FF0000"<br />
*/
setText: function(text, prop) {
var prop = prop || {};
- var size = prop.size || "18px";
+ var size = prop.size || 18;
var color = prop.color || "#FFF";
var font = prop.font || "Arial";
- this.content = new Text(text, size + " " + font, color);
+ this.content = new Text(text, size + "px " + font, color);
},
/**

0 comments on commit 3d72885

Please sign in to comment.
Something went wrong with that request. Please try again.