patrickmarabeas / ng-FitText.js

An AngularJS directive for inflating web type.
http://patrickmarabeas.github.io/ng-FitText.js
MIT License
222 stars 61 forks source link

Prevent invalid ratio calculation and fitting #36

Closed zarko-tg closed 8 years ago

zarko-tg commented 9 years ago

Demo of the problem here: http://codepen.io/zarko/pen/avmGZV

andreialecu commented 8 years ago

The problem here is that when the text is in a container that is hidden with display:none, offsetHeight and offsetWidth will return 0, since it will be set invisible as well.

+1 for this fix. I also stumbled upon this bug. @patrickmarabeas a merge and new release with this would be great.

MonkeyDo commented 8 years ago

This solved a problem I had when using this with Ionic and cached pages.

Please do merge in !

patrickmarabeas commented 8 years ago

Sorry guys! I've been swamped - will get to releasing a new version with latest round of fixes ASAP!