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