mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Fixed transform issue with Text padding.
This commit is contained in:
parent
66d216af19
commit
81275a6197
1 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue