mirror of
https://github.com/photonstorm/phaser
synced 2025-02-19 23:48:33 +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
|
else
|
||||||
{
|
{
|
||||||
this.width = style.fixedWidth;
|
this.width = style.fixedWidth;
|
||||||
|
|
||||||
|
if (w > style.fixedWidth)
|
||||||
|
{
|
||||||
|
w = style.fixedWidth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style.fixedHeight === 0)
|
if (style.fixedHeight === 0)
|
||||||
|
@ -1138,6 +1143,11 @@ var Text = new Class({
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.height = style.fixedHeight;
|
this.height = style.fixedHeight;
|
||||||
|
|
||||||
|
if (h > style.fixedHeight)
|
||||||
|
{
|
||||||
|
h = style.fixedHeight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateDisplayOrigin();
|
this.updateDisplayOrigin();
|
||||||
|
|
Loading…
Add table
Reference in a new issue