Skip to content

Commit 85bd477

Browse files
committed
allow for zero size in haxeui-flixel
1 parent 578d61b commit 85bd477

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

haxe/ui/backend/ComponentBase.hx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,13 +955,17 @@ class ComponentBase extends ComponentSurface implements IClonable<ComponentBase>
955955

956956
@:noCompletion private var _width:Null<Float>;
957957
private override function set_width(value:Float):Float {
958+
/*
958959
if (value == 0) {
959960
return value;
960961
}
962+
*/
961963
if (_width == value) {
962964
return value;
963965
}
964-
_width = value;
966+
if (value != 0) {
967+
_width = value;
968+
}
965969
componentWidth = value;
966970
return value;
967971
}
@@ -973,13 +977,17 @@ class ComponentBase extends ComponentSurface implements IClonable<ComponentBase>
973977

974978
@:noCompletion private var _height:Null<Float>;
975979
private override function set_height(value:Float):Float {
980+
/*
976981
if (value == 0) {
977982
return value;
978983
}
984+
*/
979985
if (_height == value) {
980986
return value;
981987
}
982-
_height = value;
988+
if (value != 0) {
989+
_height = value;
990+
}
983991
componentHeight = value;
984992
return value;
985993
}

0 commit comments

Comments
 (0)