MCPcopy Index your code
hub / github.com/TruthHun/BookStack / enter

Function enter

static/vuejs/vue.runtime.common.js:5919–6065  ·  view source on GitHub ↗
(vnode, toggleDisplay)

Source from the content-addressed store, hash-verified

5917/* */
5918
5919function enter (vnode, toggleDisplay) {
5920 var el = vnode.elm;
5921
5922 // call leave callback now
5923 if (el._leaveCb) {
5924 el._leaveCb.cancelled = true;
5925 el._leaveCb();
5926 }
5927
5928 var data = resolveTransition(vnode.data.transition);
5929 if (!data) {
5930 return
5931 }
5932
5933 /* istanbul ignore if */
5934 if (el._enterCb || el.nodeType !== 1) {
5935 return
5936 }
5937
5938 var css = data.css;
5939 var type = data.type;
5940 var enterClass = data.enterClass;
5941 var enterToClass = data.enterToClass;
5942 var enterActiveClass = data.enterActiveClass;
5943 var appearClass = data.appearClass;
5944 var appearToClass = data.appearToClass;
5945 var appearActiveClass = data.appearActiveClass;
5946 var beforeEnter = data.beforeEnter;
5947 var enter = data.enter;
5948 var afterEnter = data.afterEnter;
5949 var enterCancelled = data.enterCancelled;
5950 var beforeAppear = data.beforeAppear;
5951 var appear = data.appear;
5952 var afterAppear = data.afterAppear;
5953 var appearCancelled = data.appearCancelled;
5954 var duration = data.duration;
5955
5956 // activeInstance will always be the <transition> component managing this
5957 // transition. One edge case to check is when the <transition> is placed
5958 // as the root node of a child component. In that case we need to check
5959 // <transition>'s parent for appear check.
5960 var context = activeInstance;
5961 var transitionNode = activeInstance.$vnode;
5962 while (transitionNode && transitionNode.parent) {
5963 transitionNode = transitionNode.parent;
5964 context = transitionNode.context;
5965 }
5966
5967 var isAppear = !context._isMounted || !vnode.isRootInsert;
5968
5969 if (isAppear && !appear && appear !== '') {
5970 return
5971 }
5972
5973 var startClass = isAppear && appearClass
5974 ? appearClass
5975 : enterClass;
5976 var activeClass = isAppear && appearActiveClass

Callers 2

_enterFunction · 0.70

Calls 13

resolveTransitionFunction · 0.70
toNumberFunction · 0.70
isObjectFunction · 0.70
checkDurationFunction · 0.70
getHookArgumentsLengthFunction · 0.70
onceFunction · 0.70
removeTransitionClassFunction · 0.70
mergeVNodeHookFunction · 0.70
addTransitionClassFunction · 0.70
nextFrameFunction · 0.70
isValidDurationFunction · 0.70
whenTransitionEndsFunction · 0.70

Tested by

no test coverage detected