Permalink
Browse files

gallery-2012.03.23-18-00 jafl gallery-dimensions

  • Loading branch information...
1 parent fd5a2f0 commit b36c33449fdec77f6b3065af91cca841a5da8873 YUI Builder committed Mar 23, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gallery-dimensions/js/Dimensions.js
@@ -32,6 +32,7 @@ var em_div = null,
/**********************************************************************
* @method emToPx
+ * @param em_count {Number} the number of em's to convert (defaults to 1)
* @return {Number} the size of one em in pixels
* @static
*/
@@ -50,7 +51,7 @@ Y.Node.emToPx = function(
em_div.style.height = '10em';
Y.config.doc.body.appendChild(em_div);
}
- return em_count * (em_div.offsetWidth / 10.0);
+ return (em_count || 1) * (em_div.offsetWidth / 10.0);
};
/**********************************************************************

0 comments on commit b36c334

Please sign in to comment.