Slightly DRYer

This commit is contained in:
Ian Pearce
2014-10-06 03:05:27 +08:00
parent 60c009b432
commit 4924f6f06a
+3 -5
View File
@@ -68,13 +68,11 @@
// use previous font size, not the one that broke the while condition
this.setFontSize(--fontSize);
var lines = this.getWrappedText(elementWidth);
var textBlockHeight = lines.length * this.lineHeight;
} else {
var lines = this.getWrappedText(elementWidth);
var textBlockHeight = lines.length * this.lineHeight;
}
var lines = this.getWrappedText(elementWidth);
var textBlockHeight = lines.length * this.lineHeight;
// set vertical align for the whole text block
this.setTextVerticalAlign(textPos, textBlockHeight);