Browse Source

fix Text.getBounds() returning realMaxWidth

trethaller 6 năm trước cách đây
mục cha
commit
c851f0df86
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      h2d/Text.hx

+ 2 - 2
h2d/Text.hx

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