Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add underscore resize debouncer #42

merged 5 commits into from Dec 27, 2013
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.


Just for now

@@ -51,6 +51,8 @@
if($.fn.smartresize) {
eventName = 'smartresize.' + eventName;
} else if(_.debounce) {
resizeFunction = _.debounce(resizeFunction, 200)
$(window).unbind(eventName).bind(eventName, resizeFunction);
@@ -95,7 +97,7 @@
resize: true
}, options || {});

return this.each(function()
var $t = $(this).addClass('bigtext'),
maxWidth = $t.width(),
@@ -127,6 +129,7 @@
var sizes = calculateSizes($t, $children, maxWidth, options.maxfontsize, options.minfontsize);
$headCache.append(BigText.generateCss(id, sizes.fontSizes, sizes.wordSpacings, sizes.minFontSizes));
return this.trigger('bigtext:complete')

Some generated files are not rendered by default. Learn more.

@@ -17,7 +17,8 @@
<script src=""></script>
<script src="lib/jquery-partial-migrate.js"></script>
<script src="lib/qunit-1.12.0.js"></script>
<script src="lib/underscore-1.5.2.js"></script>
<script src="../bigtext.js"></script>
<script src="bigtextTest.js"></script>
ProTip! Use n and p to navigate between commits in a pull request.