Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to replace animation for transition #82

Closed
sergeysinyavsky opened this issue Jan 13, 2022 · 0 comments
Closed

Unable to replace animation for transition #82

sergeysinyavsky opened this issue Jan 13, 2022 · 0 comments

Comments

@sergeysinyavsky
Copy link

If create a transaction and try to pre-record it, two animations will be performed.

self.trans = transitions.in_right_out_left(node, ANIM_DURATION, 0, easing.SINE())
self.trans.show_in(transitions.fade_in, gui.EASING_OUTQUAD, ANIM_DURATION, 0)
.show_out(transitions.fade_out, gui.EASING_INQUAD, ANIM_DURATION, 0)
.back_in(transitions.fade_in, gui.EASING_OUTQUAD, ANIM_DURATION, 0)
.back_out(transitions.fade_out, gui.EASING_INQUAD, ANIM_DURATION, 0)

Bug is here:

-- find if there's already a transition for the node in
-- question and if so update it instead of creating a new
-- transition
for _,transition in ipairs(t) do
if transition.node == node then
transition.fn = fn
transition.easing = easing
transition.duration = duration
transitions.delay = delay
return
end
end

It should be:

for _,transition in ipairs(t.transitions) do
transition.delay = delay

Reproducing the bug:
Bug.zip

@britzl britzl closed this as completed in 17df189 Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant