mirror of
https://github.com/wassname/CanvasTextWrapper.git
synced 2026-06-27 19:45:29 +08:00
Slightly DRYer
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user