| 602 | } |
| 603 | |
| 604 | function lookup(name) { |
| 605 | if (name) { |
| 606 | var matches = [], |
| 607 | flagMap = {}, |
| 608 | classes = name.substr(1).split('.'); |
| 609 | |
| 610 | //the empty string value is the default animation |
| 611 | //operation which performs CSS transition and keyframe |
| 612 | //animations sniffing. This is always included for each |
| 613 | //element animation procedure if the browser supports |
| 614 | //transitions and/or keyframe animations. The default |
| 615 | //animation is added to the top of the list to prevent |
| 616 | //any previous animations from affecting the element styling |
| 617 | //prior to the element being animated. |
| 618 | if ($sniffer.transitions || $sniffer.animations) { |
| 619 | matches.push($injector.get(selectors[''])); |
| 620 | } |
| 621 | |
| 622 | for (var i=0; i < classes.length; i++) { |
| 623 | var klass = classes[i], |
| 624 | selectorFactoryName = selectors[klass]; |
| 625 | if (selectorFactoryName && !flagMap[klass]) { |
| 626 | matches.push($injector.get(selectorFactoryName)); |
| 627 | flagMap[klass] = true; |
| 628 | } |
| 629 | } |
| 630 | return matches; |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | function animationRunner(element, animationEvent, className, options) { |
| 635 | //transcluded directives may sometimes fire an animation using only comment nodes |