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

Function triggerAnimationStart

lib/test/angular/1.6.7/angular-animate.js:1399–1506  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1397 };
1398
1399 function triggerAnimationStart() {
1400 // just incase a stagger animation kicks in when the animation
1401 // itself was cancelled entirely
1402 if (animationClosed) return;
1403
1404 applyBlocking(false);
1405
1406 forEach(temporaryStyles, function(entry) {
1407 var key = entry[0];
1408 var value = entry[1];
1409 node.style[key] = value;
1410 });
1411
1412 applyAnimationClasses(element, options);
1413 $$jqLite.addClass(element, activeClasses);
1414
1415 if (flags.recalculateTimingStyles) {
1416 fullClassName = node.getAttribute('class') + ' ' + preparationClasses;
1417 cacheKey = gcsHashFn(node, fullClassName);
1418
1419 timings = computeTimings(node, fullClassName, cacheKey);
1420 relativeDelay = timings.maxDelay;
1421 maxDelay = Math.max(relativeDelay, 0);
1422 maxDuration = timings.maxDuration;
1423
1424 if (maxDuration === 0) {
1425 close();
1426 return;
1427 }
1428
1429 flags.hasTransitions = timings.transitionDuration > 0;
1430 flags.hasAnimations = timings.animationDuration > 0;
1431 }
1432
1433 if (flags.applyAnimationDelay) {
1434 relativeDelay = typeof options.delay !== 'boolean' && truthyTimingValue(options.delay)
1435 ? parseFloat(options.delay)
1436 : relativeDelay;
1437
1438 maxDelay = Math.max(relativeDelay, 0);
1439 timings.animationDelay = relativeDelay;
1440 delayStyle = getCssDelayStyle(relativeDelay, true);
1441 temporaryStyles.push(delayStyle);
1442 node.style[delayStyle[0]] = delayStyle[1];
1443 }
1444
1445 maxDelayTime = maxDelay * ONE_SECOND;
1446 maxDurationTime = maxDuration * ONE_SECOND;
1447
1448 if (options.easing) {
1449 var easeProp, easeVal = options.easing;
1450 if (flags.hasTransitions) {
1451 easeProp = TRANSITION_PROP + TIMING_KEY;
1452 temporaryStyles.push([easeProp, easeVal]);
1453 node.style[easeProp] = easeVal;
1454 }
1455 if (flags.hasAnimations) {
1456 easeProp = ANIMATION_PROP + TIMING_KEY;

Callers 1

startFunction · 0.70

Calls 9

applyBlockingFunction · 0.70
forEachFunction · 0.70
gcsHashFnFunction · 0.70
computeTimingsFunction · 0.70
closeFunction · 0.70
truthyTimingValueFunction · 0.70
getCssDelayStyleFunction · 0.70
registerRestorableStylesFunction · 0.70
applyAnimationToStylesFunction · 0.70

Tested by

no test coverage detected