mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Constraints canvas size if using fixedWidth, fixedHeight style
This commit is contained in:
parent
a05cd9377a
commit
b2a32a8e8f
1 changed files with 10 additions and 0 deletions
|
@ -1129,6 +1129,11 @@ var Text = new Class({
|
|||
else
|
||||
{
|
||||
this.width = style.fixedWidth;
|
||||
|
||||
if (w > style.fixedWidth)
|
||||
{
|
||||
w = style.fixedWidth;
|
||||
}
|
||||
}
|
||||
|
||||
if (style.fixedHeight === 0)
|
||||
|
@ -1138,6 +1143,11 @@ var Text = new Class({
|
|||
else
|
||||
{
|
||||
this.height = style.fixedHeight;
|
||||
|
||||
if (h > style.fixedHeight)
|
||||
{
|
||||
h = style.fixedHeight;
|
||||
}
|
||||
}
|
||||
|
||||
this.updateDisplayOrigin();
|
||||
|
|
Loading…
Reference in a new issue