Skip to content

Commit

Permalink
call show / hide a frame later when fade in/out doesnt apply
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Oct 15, 2024
1 parent aff5249 commit faae96b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions haxe/ui/core/Component.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1148,12 +1148,12 @@ class Component extends ComponentImpl
*/
public function fadeIn(onEnd:Void->Void = null, show:Bool = true) {
if (opacity == 1) { // its already "faded in", lets do nothing
if (show) {
this.show();
}
if (onEnd != null) {
onEnd();
}
if (show) {
Toolkit.callLater(this.show);
}
return;
}

Expand Down Expand Up @@ -1186,12 +1186,12 @@ class Component extends ComponentImpl
*/
public function fadeOut(onEnd:Void->Void = null, hide:Bool = true) {
if (opacity == 0) { // its already "faded out", lets do nothing
if (hide) {
this.hide();
}
if (onEnd != null) {
onEnd();
}
if (hide) {
Toolkit.callLater(this.hide);
}
return;
}
if (onEnd != null || hide == true) {
Expand Down

0 comments on commit faae96b

Please sign in to comment.