@@ -48,6 +48,24 @@ var p = Transition.prototype
48
48
/**
49
49
* Start an entering transition.
50
50
*
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
+ *
51
69
* @param {Function } op - insert/show the element
52
70
* @param {Function } [cb]
53
71
*/
@@ -96,6 +114,20 @@ p.enterDone = function () {
96
114
/**
97
115
* Start a leaving transition.
98
116
*
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
+ *
99
131
* @param {Function } op - remove/hide the element
100
132
* @param {Function } [cb]
101
133
*/
0 commit comments