davatron5000 / FitText.js

A jQuery plugin for inflating web type
http://fittextjs.com
6.76k stars 1.39k forks source link

Throttling resize event execution #32

Closed darcyclarke closed 12 years ago

darcyclarke commented 12 years ago

May be worth adding throttling options to this plugin. Especially since we're binding to the "resize" event (similar to "scroll", it fires often). Just a thought. The calculation isn't choking right now but the more elements you bind to the more listeners you add to that one event.

davatron5000 commented 12 years ago

I've thought about this some. Actually, @chriscoyier has a debounced version of fittext at the moment. but yeah. i think in interest of keeping it simple, I'll keep it doing the resize().

It's not too hard to add that in by someone who truly needs it. So I think I'll close for now. If we were to switch fittext to become a complete vw, vh, vmin ployfill, then I bet we'd have to throttle it some. #futurestuff