File tree Expand file tree Collapse file tree
src/gameobjects/text/static Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1123,13 +1123,16 @@ var Text = new Class({
11231123 if ( style . fixedWidth === 0 )
11241124 {
11251125 this . width = textSize . width + padding . left + padding . right ;
1126+
11261127 textWidth = textSize . width ;
11271128 }
11281129 else
11291130 {
11301131 this . width = style . fixedWidth ;
1132+
11311133 textWidth = this . width - padding . left - padding . right ;
1132- if ( textWidth < textSize . width )
1134+
1135+ if ( textWidth < textSize . width )
11331136 {
11341137 textWidth = textSize . width ;
11351138 }
@@ -1162,7 +1165,8 @@ var Text = new Class({
11621165
11631166 this . frame . setSize ( w , h ) ;
11641167
1165- style . syncFont ( canvas , context ) ; // Resizing resets the context
1168+ // Because resizing the canvas resets the context
1169+ style . syncFont ( canvas , context ) ;
11661170 }
11671171 else
11681172 {
You can’t perform that action at this time.
0 commit comments