浏览代码

fix Text.getBounds() returning realMaxWidth

trethaller 6 年之前
父节点
当前提交
c851f0df86
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      h2d/Text.hx

+ 2 - 2
h2d/Text.hx

@@ -338,9 +338,9 @@ class Text extends Drawable {
 			w = calcWidth;
 			h = calcSizeHeight;
 		} else {
-			x = realMaxWidth >= 0 ? 0 : calcXMin;
+			x = calcXMin;
 			y = calcYMin;
-			w = realMaxWidth >= 0 ? realMaxWidth : calcWidth;
+			w = calcWidth;
 			h = calcHeight - calcYMin;
 		}
 		addBounds(relativeTo, out, x, y, w, h);