| 369 | } |
| 370 | |
| 371 | function lookup(name) { |
| 372 | if (name) { |
| 373 | var matches = [], |
| 374 | flagMap = {}, |
| 375 | classes = name.substr(1).split('.'); |
| 376 | |
| 377 | //the empty string value is the default animation |
| 378 | //operation which performs CSS transition and keyframe |
| 379 | //animations sniffing. This is always included for each |
| 380 | //element animation procedure if the browser supports |
| 381 | //transitions and/or keyframe animations. The default |
| 382 | //animation is added to the top of the list to prevent |
| 383 | //any previous animations from affecting the element styling |
| 384 | //prior to the element being animated. |
| 385 | if ($sniffer.transitions || $sniffer.animations) { |
| 386 | matches.push($injector.get(selectors[''])); |
| 387 | } |
| 388 | |
| 389 | for(var i=0; i < classes.length; i++) { |
| 390 | var klass = classes[i], |
| 391 | selectorFactoryName = selectors[klass]; |
| 392 | if(selectorFactoryName && !flagMap[klass]) { |
| 393 | matches.push($injector.get(selectorFactoryName)); |
| 394 | flagMap[klass] = true; |
| 395 | } |
| 396 | } |
| 397 | return matches; |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | function animationRunner(element, animationEvent, className) { |
| 402 | //transcluded directives may sometimes fire an animation using only comment nodes |