mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 13:26:07 +08:00
undefined text fix
This commit is contained in:
3
konva.js
3
konva.js
@@ -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
10
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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 = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user