We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 234ded0 commit b8b7369Copy full SHA for b8b7369
1 file changed
v3/src/gameobjects/text/static/Text.js
@@ -32,7 +32,10 @@ var Text = new Class({
32
{
33
if (x === undefined) { x = 0; }
34
if (y === undefined) { y = 0; }
35
- if (text === undefined) { text = ' '; }
+ if (text === undefined) { text = ''; }
36
+
37
+ // Cast to string whatever our value may be (numeric, etc)
38
+ text = text.toString();
39
40
GameObject.call(this, scene, 'Text');
41
@@ -84,7 +87,9 @@ var Text = new Class({
84
87
}
85
88
86
89
var _this = this;
- scene.sys.game.renderer.addContextRestoredCallback(function (renderer) {
90
91
+ scene.sys.game.renderer.addContextRestoredCallback(function ()
92
+ {
93
_this.canvasTexture = null;
94
_this.dirty = true;
95
});
0 commit comments