mirror of
https://github.com/britzl/monarch.git
synced 2025-06-27 10:27:49 +02:00
Wait for both in and out transitions (#97)
This commit is contained in:
parent
6f79bd0326
commit
91204ca30b
@ -863,13 +863,10 @@ function M.show(id, options, data, cb)
|
|||||||
show_in(screen, top, options and options.reload, add_to_stack, WAIT_FOR_TRANSITION, callbacks.track())
|
show_in(screen, top, options and options.reload, add_to_stack, WAIT_FOR_TRANSITION, callbacks.track())
|
||||||
else
|
else
|
||||||
-- show screen
|
-- show screen
|
||||||
local cb = callbacks.track()
|
show_in(screen, top, options and options.reload, add_to_stack, WAIT_FOR_TRANSITION, callbacks.track())
|
||||||
show_in(screen, top, options and options.reload, add_to_stack, DO_NOT_WAIT_FOR_TRANSITION, function()
|
|
||||||
if add_to_stack and top and not top.popup then
|
if add_to_stack and top and not top.popup then
|
||||||
show_out(top, screen, WAIT_FOR_TRANSITION, callbacks.track())
|
show_out(top, screen, WAIT_FOR_TRANSITION, callbacks.track())
|
||||||
end
|
end
|
||||||
cb()
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
callbacks.when_done(function()
|
callbacks.when_done(function()
|
||||||
@ -1014,16 +1011,16 @@ function M.back(options, data, cb)
|
|||||||
-- we do this to ensure that we do not reset the times step of the screen
|
-- we do this to ensure that we do not reset the times step of the screen
|
||||||
-- we go back to until it is no longer obscured by the popup
|
-- we go back to until it is no longer obscured by the popup
|
||||||
if screen.popup and not top.popup then
|
if screen.popup and not top.popup then
|
||||||
|
local back_cb = callbacks.track()
|
||||||
back_out(screen, top, WAIT_FOR_TRANSITION, function()
|
back_out(screen, top, WAIT_FOR_TRANSITION, function()
|
||||||
back_in(top, screen, WAIT_FOR_TRANSITION, back_cb)
|
back_in(top, screen, WAIT_FOR_TRANSITION, back_cb)
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
back_in(top, screen, DO_NOT_WAIT_FOR_TRANSITION, function()
|
back_in(top, screen, WAIT_FOR_TRANSITION, callbacks.track())
|
||||||
back_out(screen, top, WAIT_FOR_TRANSITION, back_cb)
|
back_out(screen, top, WAIT_FOR_TRANSITION, callbacks.track())
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
back_out(screen, top, WAIT_FOR_TRANSITION, back_cb)
|
back_out(screen, top, WAIT_FOR_TRANSITION, callbacks.track())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user