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