소스 검색

Merge pull request #76 from darkdarkdragon/proposed2

made Label (<span>) to obey size of container
Nicolas Cannasse 10 년 전
부모
커밋
c64db6e179
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      h2d/comp/Label.hx

+ 1 - 0
h2d/comp/Label.hx

@@ -23,6 +23,7 @@ class Label extends Component {
 
 	override function resize( ctx : Context ) {
 		if( ctx.measure ) {
+            tf.maxWidth = ctx.maxWidth;
 			tf.font = getFont();
 			tf.textColor = style.color;
 			tf.text = text;