undefined text fix

This commit is contained in:
Anton Lavrenov
2016-10-28 15:36:59 -06:00
parent 0d11bff316
commit 42f268b976
3 changed files with 9 additions and 7 deletions

View File

@@ -15167,7 +15167,8 @@
this.textWidth = size.width;
this.textHeight = size.height;
var textFullWidth = this.textWidth + (this.attrs.text.length - 1) * letterSpacing;
var textFullWidth = Math.max(this.textWidth +
((this.attrs.text || '').length - 1) * letterSpacing, 0);
this.glyphInfo = [];

10
konva.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -169,7 +169,8 @@
this.textWidth = size.width;
this.textHeight = size.height;
var textFullWidth = this.textWidth + (this.attrs.text.length - 1) * letterSpacing;
var textFullWidth = Math.max(this.textWidth +
((this.attrs.text || '').length - 1) * letterSpacing, 0);
this.glyphInfo = [];