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

Function enter

static/vuejs/vue.esm.js:6365–6511  ·  view source on GitHub ↗
(vnode, toggleDisplay)

Source from the content-addressed store, hash-verified

6363/* */
6364
6365function enter (vnode, toggleDisplay) {
6366 var el = vnode.elm;
6367
6368 // call leave callback now
6369 if (el._leaveCb) {
6370 el._leaveCb.cancelled = true;
6371 el._leaveCb();
6372 }
6373
6374 var data = resolveTransition(vnode.data.transition);
6375 if (!data) {
6376 return
6377 }
6378
6379 /* istanbul ignore if */
6380 if (el._enterCb || el.nodeType !== 1) {
6381 return
6382 }
6383
6384 var css = data.css;
6385 var type = data.type;
6386 var enterClass = data.enterClass;
6387 var enterToClass = data.enterToClass;
6388 var enterActiveClass = data.enterActiveClass;
6389 var appearClass = data.appearClass;
6390 var appearToClass = data.appearToClass;
6391 var appearActiveClass = data.appearActiveClass;
6392 var beforeEnter = data.beforeEnter;
6393 var enter = data.enter;
6394 var afterEnter = data.afterEnter;
6395 var enterCancelled = data.enterCancelled;
6396 var beforeAppear = data.beforeAppear;
6397 var appear = data.appear;
6398 var afterAppear = data.afterAppear;
6399 var appearCancelled = data.appearCancelled;
6400 var duration = data.duration;
6401
6402 // activeInstance will always be the <transition> component managing this
6403 // transition. One edge case to check is when the <transition> is placed
6404 // as the root node of a child component. In that case we need to check
6405 // <transition>'s parent for appear check.
6406 var context = activeInstance;
6407 var transitionNode = activeInstance.$vnode;
6408 while (transitionNode && transitionNode.parent) {
6409 transitionNode = transitionNode.parent;
6410 context = transitionNode.context;
6411 }
6412
6413 var isAppear = !context._isMounted || !vnode.isRootInsert;
6414
6415 if (isAppear && !appear && appear !== '') {
6416 return
6417 }
6418
6419 var startClass = isAppear && appearClass
6420 ? appearClass
6421 : enterClass;
6422 var activeClass = isAppear && appearActiveClass

Callers 2

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