Skip to content

Commit 72df134

Browse files
committed
Constrains canvas sizer via game object size
1 parent 2a51bb8 commit 72df134

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/gameobjects/text/static/Text.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,11 +1128,6 @@ var Text = new Class({
11281128
else
11291129
{
11301130
this.width = style.fixedWidth;
1131-
1132-
if (w > style.fixedWidth)
1133-
{
1134-
w = style.fixedWidth;
1135-
}
11361131
}
11371132

11381133
if (style.fixedHeight === 0)
@@ -1142,11 +1137,16 @@ var Text = new Class({
11421137
else
11431138
{
11441139
this.height = style.fixedHeight;
1140+
}
11451141

1146-
if (h > style.fixedHeight)
1147-
{
1148-
h = style.fixedHeight;
1149-
}
1142+
if (w > this.width)
1143+
{
1144+
w = this.width;
1145+
}
1146+
1147+
if (h > this.height)
1148+
{
1149+
h = this.height;
11501150
}
11511151

11521152
this.updateDisplayOrigin();

0 commit comments

Comments
 (0)