MCPcopy Create free account
hub / github.com/TruthHun/BookStack / enter

Function enter

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

Source from the content-addressed store, hash-verified

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

Callers 2

_enterFunction · 0.70
vue.runtime.jsFile · 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