MCPcopy
hub / github.com/angular-ui/ui-grid / triggerAnimationStart

Function triggerAnimationStart

lib/test/angular/1.8.0/angular-animate.js:1377–1484  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1375 };
1376
1377 function triggerAnimationStart() {
1378 // just incase a stagger animation kicks in when the animation
1379 // itself was cancelled entirely
1380 if (animationClosed) return;
1381
1382 applyBlocking(false);
1383
1384 forEach(temporaryStyles, function(entry) {
1385 var key = entry[0];
1386 var value = entry[1];
1387 node.style[key] = value;
1388 });
1389
1390 applyAnimationClasses(element, options);
1391 $$jqLite.addClass(element, activeClasses);
1392
1393 if (flags.recalculateTimingStyles) {
1394 fullClassName = node.getAttribute('class') + ' ' + preparationClasses;
1395 cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass);
1396
1397 timings = computeTimings(node, fullClassName, cacheKey, false);
1398 relativeDelay = timings.maxDelay;
1399 maxDelay = Math.max(relativeDelay, 0);
1400 maxDuration = timings.maxDuration;
1401
1402 if (maxDuration === 0) {
1403 close();
1404 return;
1405 }
1406
1407 flags.hasTransitions = timings.transitionDuration > 0;
1408 flags.hasAnimations = timings.animationDuration > 0;
1409 }
1410
1411 if (flags.applyAnimationDelay) {
1412 relativeDelay = typeof options.delay !== 'boolean' && truthyTimingValue(options.delay)
1413 ? parseFloat(options.delay)
1414 : relativeDelay;
1415
1416 maxDelay = Math.max(relativeDelay, 0);
1417 timings.animationDelay = relativeDelay;
1418 delayStyle = getCssDelayStyle(relativeDelay, true);
1419 temporaryStyles.push(delayStyle);
1420 node.style[delayStyle[0]] = delayStyle[1];
1421 }
1422
1423 maxDelayTime = maxDelay * ONE_SECOND;
1424 maxDurationTime = maxDuration * ONE_SECOND;
1425
1426 if (options.easing) {
1427 var easeProp, easeVal = options.easing;
1428 if (flags.hasTransitions) {
1429 easeProp = TRANSITION_PROP + TIMING_KEY;
1430 temporaryStyles.push([easeProp, easeVal]);
1431 node.style[easeProp] = easeVal;
1432 }
1433 if (flags.hasAnimations) {
1434 easeProp = ANIMATION_PROP + TIMING_KEY;

Callers 1

startFunction · 0.70

Calls 8

applyBlockingFunction · 0.70
forEachFunction · 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