Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/haxeui/haxeui-core
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Mar 24, 2024
2 parents cee6e7c + f57a7d9 commit 93ad967
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions haxe/ui/animation/AnimationTools.hx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ class AnimationTools {
}

public static function slideToRight(c:Component, delayMs:Int = 0, onComplete:Void->Void = null, duration:Float = .2, easing:String = "linear") {
c.opacity = 0;
if (!c.isReady) {
c.registerEvent(UIEvent.READY, function(_) {
slideToRight(c, delayMs, onComplete, duration, easing);
Expand All @@ -235,9 +236,11 @@ class AnimationTools {
builder.setPosition(100, "left", Std.int(originX), true);
if (delayMs <= 0) {
builder.play();
c.opacity = 1;
} else {
haxe.ui.util.Timer.delay(function() {
builder.play();
c.opacity = 1;
}, delayMs);
}
}
Expand Down

0 comments on commit 93ad967

Please sign in to comment.