From 1e72b97a51411f66a2102453e90e52f9197d56df Mon Sep 17 00:00:00 2001 From: Rod Begbie Date: Mon, 28 May 2012 16:38:17 -0700 Subject: [PATCH] Fix for initial font-size guess being too big. Fix the case where the maxFontSize is just slightly too big for the space available, and BigText's initial guess is larger than maxFontSize. (also, some light cleanup to make jshint happy) --- bigtext.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/bigtext.js b/bigtext.js index 0fa796f..2f15ffb 100644 --- a/bigtext.js +++ b/bigtext.js @@ -65,9 +65,9 @@ BigText.clearCss(id); for(var j=0, k=linesFontSizes.length; j maxFontSize) { + newFontSize = newFontSize - 1; + } + outer: for(var m=0, n=intervals.length; m maxFontSize) {