MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / queueAnimation

Function queueAnimation

lib/test/angular/1.6.7/angular-animate.js:2448–2728  ·  view source on GitHub ↗
(originalElement, event, initialOptions)

Source from the content-addressed store, hash-verified

2446 return $animate;
2447
2448 function queueAnimation(originalElement, event, initialOptions) {
2449 // we always make a copy of the options since
2450 // there should never be any side effects on
2451 // the input data when running `$animateCss`.
2452 var options = copy(initialOptions);
2453
2454 var element = stripCommentsFromElement(originalElement);
2455 var node = getDomNode(element);
2456 var parentNode = node && node.parentNode;
2457
2458 options = prepareAnimationOptions(options);
2459
2460 // we create a fake runner with a working promise.
2461 // These methods will become available after the digest has passed
2462 var runner = new $$AnimateRunner();
2463
2464 // this is used to trigger callbacks in postDigest mode
2465 var runInNextPostDigestOrNow = postDigestTaskFactory();
2466
2467 if (isArray(options.addClass)) {
2468 options.addClass = options.addClass.join(' ');
2469 }
2470
2471 if (options.addClass && !isString(options.addClass)) {
2472 options.addClass = null;
2473 }
2474
2475 if (isArray(options.removeClass)) {
2476 options.removeClass = options.removeClass.join(' ');
2477 }
2478
2479 if (options.removeClass && !isString(options.removeClass)) {
2480 options.removeClass = null;
2481 }
2482
2483 if (options.from && !isObject(options.from)) {
2484 options.from = null;
2485 }
2486
2487 if (options.to && !isObject(options.to)) {
2488 options.to = null;
2489 }
2490
2491 // If animations are hard-disabled for the whole application there is no need to continue.
2492 // There are also situations where a directive issues an animation for a jqLite wrapper that
2493 // contains only comment nodes. In this case, there is no way we can perform an animation.
2494 if (!animationsEnabled ||
2495 !node ||
2496 !isAnimatableByFilter(node, event, initialOptions) ||
2497 !isAnimatableClassName(node, options)) {
2498 close();
2499 return runner;
2500 }
2501
2502 var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
2503
2504 var documentHidden = $$isDocumentHidden();
2505

Callers 1

angular-animate.jsFile · 0.70

Calls 15

copyFunction · 0.70
stripCommentsFromElementFunction · 0.70
getDomNodeFunction · 0.70
prepareAnimationOptionsFunction · 0.70
postDigestTaskFactoryFunction · 0.70
isStringFunction · 0.70
isObjectFunction · 0.70
closeFunction · 0.70
areAnimationsAllowedFunction · 0.70
notifyProgressFunction · 0.70
closeChildAnimationsFunction · 0.70
isAllowedFunction · 0.70

Tested by

no test coverage detected