瀏覽代碼

fixed unconstraint fillWidth not being updated on scene resize

Nicolas Cannasse 6 年之前
父節點
當前提交
8373efc2a6
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      h2d/Flow.hx

+ 4 - 0
h2d/Flow.hx

@@ -488,6 +488,10 @@ class Flow extends Object {
 	}
 
 	override function sync(ctx:RenderContext) {
+		if( !isConstraint && (fillWidth || fillHeight) ) {
+			var scene = ctx.scene;
+			if( scene.width != constraintWidth || scene.height != constraintHeight ) needReflow = true;
+		}
 		if( needReflow ) reflow();
 		super.sync(ctx);
 	}