Constraints canvas size if using fixedWidth, fixedHeight style

This commit is contained in:
Rex 2019-05-01 10:06:04 +08:00
parent a05cd9377a
commit b2a32a8e8f

View file

@ -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();