This commit is contained in:
mhartington
2015-12-14 15:05:58 -05:00
parent 6c0963dffc
commit 28d464c2e6
4 changed files with 61 additions and 48 deletions

View File

@ -5,23 +5,27 @@ import {extend} from '../util/util';
/** /**
Animation Steps/Process Animation Steps/Process
----------------------- -----------------------
1) Construct animation (doesn't start)
2) Client play()'s animation, returns promise - Construct animation (doesn't start)
3) Add before classes to elements - Client play()'s animation, returns promise
4) Remove before classes from elements - Add before classes to elements
5) Elements staged in "from" effect w/ inline styles - Remove before classes from elements
6) Call onReady() - Elements staged in "from" effect w/ inline styles
7) Wait for RENDER_DELAY milliseconds (give browser time to render) - Call onReady()
8) Call onPlay() - Wait for RENDER_DELAY milliseconds (give browser time to render)
8) Run from/to animation on elements - Call onPlay()
9) Animations finish async - Run from/to animation on elements
10) Set inline styles w/ the "to" effects on elements - Animations finish async
11) Add after classes to elements - Set inline styles w/ the "to" effects on elements
12) Remove after classes from elements - Add after classes to elements
13) Call onFinish() - Remove after classes from elements
14) Resolve play()'s promise - Call onFinish()
- Resolve play()'s promise
**/ **/
/**
* @private
**/
export class Animation { export class Animation {
constructor(ele, opts={}) { constructor(ele, opts={}) {
@ -554,6 +558,9 @@ export class Animation {
} }
/**
* @private
**/
class Animate { class Animate {
constructor(ele, fromEffect, toEffect, duration, easingConfig, playbackRate) { constructor(ele, fromEffect, toEffect, duration, easingConfig, playbackRate) {

View File

@ -1,10 +1,3 @@
/**
* @ngdoc service
* @name ActionSheet
* @module ionic
* @description
* The ActionSheet is a modal menu with options to select based on an action.
*/
import {Component, Injectable, Renderer} from 'angular2/core'; import {Component, Injectable, Renderer} from 'angular2/core';
import {NgFor, NgIf} from 'angular2/common'; import {NgFor, NgIf} from 'angular2/common';

View File

@ -5,14 +5,28 @@ import {ionicProviders} from '../bootstrap';
import {IONIC_DIRECTIVES} from '../directives'; import {IONIC_DIRECTIVES} from '../directives';
/** /**
* @ngdoc service
* @name App * @name App
* @module ionic
* @param {object} [config] - the app's [../Config](Config) object
* @param {string} [template] - the template to use for the app root
* @param {string} [templateUrl] - a relative URL pointing to the template to use for the app root
* @description * @description
* App is an Ionic decorator that bootstraps an application. It can be passed a number of arguments, that act as global config variables for the app. * App is an Ionic decorator that bootstraps an application. It can be passed a number of arguments, that act as global config variables for the app.
* App can accept a `template` property that has an inline template or a `templateUrl` property that points to an external html template.
*
* @usage
* ```ts
* import {App} from 'ionic/ionic';
*
* @App({
* templateUrl: 'app/app.html'
* })
*
* export class MyApp{
*
* }
* ```
*
* @param {Object} [config] - the app's [../Config](Config) object
* @param {String} [template] - the template to use for the app root
* @param {String} [templateUrl] - a relative URL pointing to the template to use for the app root
*
*/ */
export function App(args={}) { export function App(args={}) {

View File

@ -27,7 +27,7 @@ angular_controller: APIDemoCtrl <@ endif @>
<a href="https://github.com/<$ versionInfo.gitRepoInfo.owner $>/<$ versionInfo.gitRepoInfo.repo $>/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line+1 $>-L<$ doc.location.end.line+1 $>"><$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>)</a> <a href="https://github.com/<$ versionInfo.gitRepoInfo.owner $>/<$ versionInfo.gitRepoInfo.repo $>/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line+1 $>-L<$ doc.location.end.line+1 $>"><$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>)</a>
<@- endmacro -@> <@- endmacro -@>
<@ macro paramTable(params, isDirective) @> <@ macro paramTable(params, isDirective) -@>
<table class="table" style="margin:0;"> <table class="table" style="margin:0;">
<thead> <thead>
<tr> <tr>
@ -55,16 +55,17 @@ angular_controller: APIDemoCtrl <@ endif @>
<@ endfor @> <@ endfor @>
</tbody> </tbody>
</table> </table>
<@ endmacro @> <@- endmacro -@>
<@- macro functionSyntax(fn) @> <@- macro functionSyntax(fn) @>
<@- set sep = joiner(', ') -@> <@- set sep = joiner(',&nbsp;') -@>
<code><$ fn.name $>(<@- for param in fn.params @><$ sep() $> <code><$ fn.name $>(<@- for param in fn.params @><$ sep() $>
<@- if param.type.optional @>[<@ endif -@> <@- if param.type.optional @>[<@ endif -@>
<$ param.name $> <$ param.name $>
<@- if param.type.optional @>]<@ endif -@> <@- if param.type.optional @>]<@ endif -@>
<@ endfor @>)</code><@ if fn.alias @><small>(alias: <$ fn.alias $>)</small><@ endif @> <@ endfor @>)</code>
<@ if fn.alias @><small>(alias: <$ fn.alias $>)</small><@ endif @>
<@ endmacro -@> <@ endmacro -@>
<@ macro typeList(types) -@> <@ macro typeList(types) -@>
@ -73,30 +74,29 @@ angular_controller: APIDemoCtrl <@ endif @>
<@- endmacro -@> <@- endmacro -@>
<@- macro typeInfo(fn) -@> <@- macro typeInfo(fn) -@>
<$ typeList(fn.typeList) $> <$ fn.description $> <$ typeList(fn.typeList) $> <$ fn.description $>
<@- endmacro -@> <@- endmacro -@>
<@ block body @> <@ block body @>
<div class="improve-docs"> <div class="improve-docs">
<a href='http://github.com/driftyco/ionic2/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line $>'> <a href='http://github.com/driftyco/ionic2/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line $>'>
View Source View Source
</a> </a>
&nbsp; &nbsp;
<a href='http://github.com/driftyco/ionic2/edit/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line $>'> <a href='http://github.com/driftyco/ionic2/edit/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line $>'>
Improve this doc Improve this doc
</a> </a>
</div> </div>
<@ block content @> <@ block content @>
<@ block header @> <@ block header @>
<h1 class="api-title"> <h1 class="api-title">
<@ if doc.docType == "directive" @> <@ if doc.docType == "directive" @>
<$ doc.name | dashCase $> <$ doc.name | dashCase $>
<@ else @> <@ else @>
<$ doc.name $> <$ doc.name $>
<@ endif @> <@ endif @>
@ -124,6 +124,7 @@ Delegate: <$ doc.delegate $>
<@ endblock @> <@ endblock @>
<!-- description -->
<h2>Description</h2> <h2>Description</h2>
<@ block description @> <@ block description @>
<$ doc.description | marked $> <$ doc.description | marked $>
@ -135,7 +136,7 @@ Delegate: <$ doc.delegate $>
<h3><$ doc.directiveInfo.properties[0].name $>: <code><$ doc.directiveInfo.properties[0].values $></code></h3> <h3><$ doc.directiveInfo.properties[0].name $>: <code><$ doc.directiveInfo.properties[0].values $></code></h3>
<@ endif -@> <@ endif -@>
<!-- @usage tag -->
<@ if doc.usage @> <@ if doc.usage @>
<h2>Usage</h2> <h2>Usage</h2>
<@ block usage @> <@ block usage @>
@ -143,7 +144,7 @@ Delegate: <$ doc.delegate $>
<@ endblock @> <@ endblock @>
<@ endif @> <@ endif @>
<!-- @property tags -->
<@ if doc.properties @> <@ if doc.properties @>
<h2>Attributes:</h2> <h2>Attributes:</h2>
<table class="table" style="margin:0;"> <table class="table" style="margin:0;">
@ -186,6 +187,7 @@ Delegate: <$ doc.delegate $>
</table> </table>
<@ endif @> <@ endif @>
<!-- methods on the class -->
<@- if doc.members and doc.members.length @> <@- if doc.members and doc.members.length @>
<h2>Methods</h2> <h2>Methods</h2>
@ -217,10 +219,7 @@ Delegate: <$ doc.delegate $>
<@- endif -@> <@- endif -@>
<!-- related link -->
<@- if doc.see @> <@- if doc.see @>
<h2>Related</h2> <h2>Related</h2>