@@ -48,6 +48,24 @@ var p = Transition.prototype
4848/**
4949 * Start an entering transition.
5050 *
51+ * 1. enter transition triggered
52+ * 2. call beforeEnter hook
53+ * 3. add enter class
54+ * 4. insert/show element
55+ * 5. call enter hook (with possible explicit js callback)
56+ * 6. reflow
57+ * 7. based on transition type:
58+ * - transition:
59+ * remove class now, wait for transitionend,
60+ * then done if there's no explicit js callback.
61+ * - animation:
62+ * wait for animationend, remove class,
63+ * then done if there's no explicit js callback.
64+ * - no css transition:
65+ * done now if there's no explicit js callback.
66+ * 8. wait for either done or js callback, then call
67+ * afterEnter hook.
68+ *
5169 * @param {Function } op - insert/show the element
5270 * @param {Function } [cb]
5371 */
@@ -96,6 +114,20 @@ p.enterDone = function () {
96114/**
97115 * Start a leaving transition.
98116 *
117+ * 1. leave transition triggered.
118+ * 2. call beforeLeave hook
119+ * 3. add leave class (trigger css transition)
120+ * 4. call leave hook (with possible explicit js callback)
121+ * 5. reflow if no explicit js callback is provided
122+ * 6. based on transition type:
123+ * - transition or animation:
124+ * wait for end event, remove class, then done if
125+ * there's no explicit js callback.
126+ * - no css transition:
127+ * done if there's no explicit js callback.
128+ * 7. wait for either done or js callback, then call
129+ * afterLeave hook.
130+ *
99131 * @param {Function } op - remove/hide the element
100132 * @param {Function } [cb]
101133 */
0 commit comments