Skip to content
Discussion options

You must be logged in to vote

Thanks for the video! That's because in step 3 the animation is switched back on and the offset changes in the same update, so the control picks up the new animate_offset and the target position at the same moment and just jumps. Re-enable the animation as its own update before moving it:

    # 2. jump the new block to the right side, no animation
    item_join.animate_offset = None
    item_join.offset = ft.Offset(x=0.3)
    Column.controls = [item_join]
    Column.update()
    await asyncio.sleep(0.05)

    # 2b. turn the animation back on while it's still sitting on the right
    item_join.animate_offset = ft.Animation(duration=250)
    item_join.update()
    await asyncio.sleep(0.05)
…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@PvKa732
Comment options

@TheMysteriousGhost
Comment options

Answer selected by PvKa732
@PvKa732
Comment options

@TheMysteriousGhost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants