Table of Contents
The Life of a Transition discussion
- Immediately after creating a transition
- You may configure the transition using methods such as
- Methods that specify target values (such as
transition.attr) are evaluated synchronously
- Methods that require the starting value for interpolation, such as
transition.styleTween, must be deferred until the transition starts.
- Shortly after creation, either at the end of the current frame or during the next frame, the transition is scheduled.
- When the transition subsequently starts, it interrupts the active transition of the same name on the same element, if any, dispatching an interrupt event to registered listeners.
- The transition then dispatches a
startevent to registered listeners.
- When a transition ends, it invokes its tweens a final time with a (non-eased) t-value of
- It then dispatches an
endevent to registered listeners.
- After ending, the transition is deleted from the element, and its configuration is destroyed.
Trigger a callback which uses the end state of transition howto
trigger.remove() is registered like any other
end listeners(link), some
end listeners are triggered before
To prevent from triggering
end listeners before removing, We need to use transition chaining: