convert text to string it is a number before drawing text.

pull/89/head
Michael Aschauer 2020-03-16 15:36:20 -07:00
rodzic 19b2b93226
commit 847e366275
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -938,7 +938,11 @@ SpriteMorph.prototype.drawTextScale = function (text, scale, trim) {
vy = Math.sin(radians(this.heading - 90));
nx = Math.cos(radians(this.heading ));
ny = Math.sin(radians(this.heading ));
if (!isNaN(text)) {
text = text.toString()
}
for(var i in text) {
var index = text.charCodeAt(i) - 33;
var x = this.xPosition();