diff options
| author | Matias Niemelä | 2013-06-18 13:59:57 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-07-26 23:49:54 -0700 |
| commit | 81923f1e41560327f7de6e8fddfda0d2612658f3 (patch) | |
| tree | bbf8151bddf4d026f8f5fa3196b84a45ecd9c858 /docs/src/templates | |
| parent | 11521a4cde689c2bd6aaa227b1f45cb3fb53725b (diff) | |
| download | angular.js-81923f1e41560327f7de6e8fddfda0d2612658f3.tar.bz2 | |
feat(ngAnimate): complete rewrite of animations
- ngAnimate directive is gone and was replaced with class based animations/transitions
- support for triggering animations on css class additions and removals
- done callback was added to all animation apis
- $animation and $animator where merged into a single $animate service with api:
- $animate.enter(element, parent, after, done);
- $animate.leave(element, done);
- $animate.move(element, parent, after, done);
- $animate.addClass(element, className, done);
- $animate.removeClass(element, className, done);
BREAKING CHANGE: too many things changed, we'll write up a separate doc with migration instructions
Diffstat (limited to 'docs/src/templates')
| -rw-r--r-- | docs/src/templates/css/animations.css | 43 | ||||
| -rw-r--r-- | docs/src/templates/index.html | 13 | ||||
| -rw-r--r-- | docs/src/templates/js/docs.js | 2 |
3 files changed, 30 insertions, 28 deletions
diff --git a/docs/src/templates/css/animations.css b/docs/src/templates/css/animations.css index 2d54bbfb..7324a8a1 100644 --- a/docs/src/templates/css/animations.css +++ b/docs/src/templates/css/animations.css @@ -1,4 +1,4 @@ -.reveal { +.reveal.ng-enter { -webkit-transition:1s linear all; -moz-transition:1s linear all; -o-transition:1s linear all; @@ -6,7 +6,7 @@ opacity:0; } -.reveal.reveal-active { +.reveal.ng-enter.ng-enter-active { opacity:1; } @@ -15,48 +15,45 @@ overflow:hidden; } -.slide-reveal { +.slide-reveal > .ng-enter { -webkit-transition:0.5s linear all; -moz-transition:0.5s linear all; -o-transition:0.5s linear all; transition:0.5s linear all; - opacity:0.5; + opacity:0.5; position:relative; opacity:0; top:10px; } -.slide-reveal.slide-reveal-active { +.slide-reveal > .ng-enter.ng-enter-active { top:0; opacity:1; } -.expand-enter { +.expand.ng-enter, +.expand.ng-leave { -webkit-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -moz-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -o-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; - +} +.expand.ng-enter { opacity:0; line-height:0; height:0!important; } -.expand-enter.expand-enter-active { +.expand.ng-enter.expand.ng-enter-active { opacity:1; line-height:20px; height:20px!important; } -.expand-leave { - -webkit-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; - -moz-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; - -o-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; - transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; - +.expand.ng-leave { opacity:1; height:20px; } -.expand-leave.expand-leave-active { +.expand.ng-leave.expand.ng-leave-active { opacity:0; height:0; } @@ -73,32 +70,36 @@ padding:1em; } -.animator-container.animations-off * { +.animate-container.animations-off * { -webkit-transition: none; -moz-transition: none; -o-transition: color 0 ease-in; /* opera is special :) */ transition: none; } -.foldout-show, .foldout-enter, .foldout-hide { +.foldout.ng-enter, +.foldout.ng-hide-add, +.foldout.ng-hide-remove { -webkit-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -moz-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -o-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; } -.foldout-show, .foldout-enter { +.foldout.ng-hide-remove, +.foldout.ng-enter { opacity:0; } -.foldout-show.foldout-show-active, .foldout-hide.foldout-hide-active { +.foldout.ng-hide-remove.ng-hide-remove-active, +.foldout.ng-enter.ng-enter-active { opacity:1; } -.foldout-hide { +.foldout.ng-hide-add { opacity:1; } -.foldout-hide.foldout-hide-active { +.foldout.ng-hide-add.ng-hide-active { opacity:0; } diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 82a5c87e..3f3e83c8 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -43,6 +43,7 @@ addTag('script', {src: path('angular-cookies.js') }, sync); addTag('script', {src: path('angular-sanitize.js') }, sync); addTag('script', {src: path('angular-mobile.js') }, sync); + addTag('script', {src: path('angular-animate.js') }, sync); addTag('script', {src: 'components/angular-bootstrap.js' }, sync); addTag('script', {src: 'components/angular-bootstrap-prettify.js' }, sync); addTag('script', {src: 'components/google-code-prettify.js' }, sync); @@ -201,7 +202,7 @@ </header> <div id="docs-fold-overlay" ng-show="docs_fold" ng-click="fold(null)"></div> - <div id="docs-fold" ng-show="docs_fold" ng-animate="'fold'"> + <div class="foldout" id="docs-fold" ng-show="docs_fold"> <div id="docs-fold-close" ng-click="fold(null)"> <span class="icon-remove-sign"></span> </div> @@ -283,21 +284,21 @@ <li class="nav-header section" ng-show="module.directives"> <a href="{{URL.directive}}" class="guide">directive</a> </li> - <li ng-repeat="page in module.directives track by page.url" ng-class="navClass(page)" ng-animate="'expand'" class="api-list-item"> + <li ng-repeat="page in module.directives track by page.url" ng-class="navClass(page)" class="expand api-list-item"> <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a> </li> <li class="nav-header section" ng-show="module.filters"> <a href="{{URL.filter}}" class="guide">filter</a> </li> - <li ng-repeat="page in module.filters track by page.url" ng-class="navClass(page)" ng-animate="'expand'" class="api-list-item"> + <li ng-repeat="page in module.filters track by page.url" ng-class="navClass(page)" class="expand api-list-item"> <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a> </li> <li class="nav-header section" ng-show="module.services"> <a href="{{URL.service}}" class="guide">service</a> </li> - <li ng-repeat="service in module.services track by service.instance.url" ng-animate="'expand'" ng-class="navClass(service.instance, service.provider)" class="api-list-item"> + <li ng-repeat="service in module.services track by service.instance.url" ng-class="navClass(service.instance, service.provider)" class="api-list-item expand"> <a ng-show="service.provider" class="pull-right" href="{{service.provider.url}}" tabindex="2"><i class="icon-cog"></i></a> <a href="{{service.instance.url}}" tabindex="2">{{service.name}}</a> </li> @@ -305,7 +306,7 @@ <li class="nav-header section" ng-show="module.types"> <a href="{{URL.type}}" class="guide">Types</a> </li> - <li ng-repeat="page in module.types track by page.url" ng-class="navClass(page)" ng-animate="'expand'" class="api-list-item"> + <li ng-repeat="page in module.types track by page.url" ng-class="navClass(page)" class="expand api-list-item"> <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a> </li> @@ -334,7 +335,7 @@ <div id="loading" ng-show="loading">Loading...</div> - <div ng-hide="loading" ng-include src="currentPage.partialUrl" onload="afterPartialLoaded()" autoscroll class="content" ng-animate="{enter: 'slide-reveal'}" ></div> + <div ng-hide="loading" ng-include src="currentPage.partialUrl" onload="afterPartialLoaded()" autoscroll class="content slide-reveal"></div> <div id="disqus" class="disqus"> <h2>Discussion</h2> diff --git a/docs/src/templates/js/docs.js b/docs/src/templates/js/docs.js index 7cac6a9a..05b09571 100644 --- a/docs/src/templates/js/docs.js +++ b/docs/src/templates/js/docs.js @@ -803,7 +803,7 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie }; -angular.module('docsApp', ['ngResource', 'ngRoute', 'ngCookies', 'ngSanitize', 'bootstrap', 'bootstrapPrettify', 'docsData']). +angular.module('docsApp', ['ngResource', 'ngRoute', 'ngCookies', 'ngSanitize', 'ngAnimate', 'bootstrap', 'bootstrapPrettify', 'docsData']). config(function($locationProvider) { $locationProvider.html5Mode(true).hashPrefix('!'); }). |
