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

Function computeCachedCssStyles

lib/test/angular/1.8.0/angular-animate.js:845–864  ·  view source on GitHub ↗
(node, className, cacheKey, allowNoDuration, properties)

Source from the content-addressed store, hash-verified

843 var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
844
845 function computeCachedCssStyles(node, className, cacheKey, allowNoDuration, properties) {
846 var timings = $$animateCache.get(cacheKey);
847
848 if (!timings) {
849 timings = computeCssStyles($window, node, properties);
850 if (timings.animationIterationCount === 'infinite') {
851 timings.animationIterationCount = 1;
852 }
853 }
854
855 // if a css animation has no duration we
856 // should mark that so that repeated addClass/removeClass calls are skipped
857 var hasDuration = allowNoDuration || (timings.transitionDuration > 0 || timings.animationDuration > 0);
858
859 // we keep putting this in multiple times even though the value and the cacheKey are the same
860 // because we're keeping an internal tally of how many duplicate animations are detected.
861 $$animateCache.put(cacheKey, timings, hasDuration);
862
863 return timings;
864 }
865
866 function computeCachedCssStaggerStyles(node, className, cacheKey, properties) {
867 var stagger;

Callers 1

computeTimingsFunction · 0.70

Calls 1

computeCssStylesFunction · 0.70

Tested by

no test coverage detected