diff --git a/v3/src/gameobjects/text/static/Text.js b/v3/src/gameobjects/text/static/Text.js index b150ee8b7..ee7bc523a 100644 --- a/v3/src/gameobjects/text/static/Text.js +++ b/v3/src/gameobjects/text/static/Text.js @@ -306,11 +306,6 @@ var Text = new Class({ var w = textSize.width + padding.left + padding.right; var h = textSize.height + padding.top + padding.bottom; - // console.log(textSize); - // console.log(padding); - // console.log(w, 'x', h); - // console.log(''); - if (!style.fixedWidth) { this.width = w; @@ -336,6 +331,8 @@ var Text = new Class({ context.clearRect(0, 0, w, h); } + context.save(); + if (style.backgroundColor) { context.fillStyle = style.backgroundColor; @@ -397,6 +394,8 @@ var Text = new Class({ } } + context.restore(); + this.dirty = true; return this;