Fix ellipsis rendering for Konva.Text

This commit is contained in:
Anton Lavrenov
2020-12-18 11:12:19 -05:00
parent e6c842c83f
commit 6fcfd4de54
5 changed files with 12 additions and 5 deletions

View File

@@ -463,7 +463,7 @@ export class Text extends Shape<TextConfig> {
substrWidth = this._getTextWidth(substr) + additionalWidth;
if (substrWidth <= maxWidth) {
low = mid + 1;
match = substr + (shouldAddEllipsis ? ELLIPSIS : '');
match = substr;
matchWidth = substrWidth;
} else {
high = mid;