datchley / react-scale-text

A React library to keep an element's text scaled to fit it's container
MIT License
54 stars 18 forks source link

fix(resize): correct check for overflow in wrapper #5

Closed datchley closed 7 years ago

datchley commented 7 years ago

Was incorrectly checking for overflow using getBoundingClientRect(), which wasn't consistently returning the width of the child element if there was actually overflow in the parent.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 93.913% when pulling 3bb27a20932c458d29d17f77b50ce331ce6c9670 on overflow-fix into 24852b2b77126c52a94fefb33d71aa87a8b31803 on master.