Skip to content

Commit

Permalink
contentContainer could be null if parent class sets width in ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Jan 8, 2025
1 parent 146e9d6 commit eac2101
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions haxe/ui/containers/Panel.hx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,17 @@ class Panel extends VBox {
#if (haxeui_openfl || haxeui_nme || haxeui_flixel)

public override function set_width(value:Float):Float {
contentContainer.percentWidth = 100;
trace(contentContainer);
if (contentContainer != null) {
contentContainer.percentWidth = 100;
}
return super.set_width(value);
}

public override function set_height(value:Float):Float {
contentContainer.percentHeight = 100;
if (contentContainer != null) {
contentContainer.percentHeight = 100;
}
return super.set_height(value);
}

Expand Down

0 comments on commit eac2101

Please sign in to comment.