From 847e366275b643451c4a8c543ba85743bcc98dd3 Mon Sep 17 00:00:00 2001 From: Michael Aschauer Date: Mon, 16 Mar 2020 15:36:20 -0700 Subject: [PATCH] convert text to string it is a number before drawing text. --- stitchcode/objects.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stitchcode/objects.js b/stitchcode/objects.js index 4ee230b1..8c4efb14 100644 --- a/stitchcode/objects.js +++ b/stitchcode/objects.js @@ -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();