From c28ed3dca06350d9190d87818f3c5522290ad9a7 Mon Sep 17 00:00:00 2001 From: romankaufmann Date: Sat, 27 May 2017 13:35:49 +0200 Subject: [PATCH] Readded widht and height check --- textfit-div.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/textfit-div.html b/textfit-div.html index 28aae34..a4ae829 100755 --- a/textfit-div.html +++ b/textfit-div.html @@ -226,10 +226,10 @@ return; if (this.$.fitMe.innerHTML.length < 1) return; - /*if (this.$.fitMe.clientHeight <= 0 || this.$.fitMe.clientWidth <= 0) { + if (this.$.fitMe.clientHeight <= 0 || this.$.fitMe.clientWidth <= 0) { console.debug('textfit-div has no size yet, therefore the text can not be fitted.'); return; - }*/ + } try { textFit(this.$.fitMe, { alignHoriz: this.horizontalCenter,