-
Notifications
You must be signed in to change notification settings - Fork 877
Conversation
|
||
For other browsers, a polyfill is required. Grab | ||
[`web-animations.min.js` from here](https://github.com/web-animations/web-animations-js) and | ||
[`web-animations.min.js` from Github](https://github.com/web-animations/web-animations-js) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github -> GitHub
(global)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
* [Animation callbacks](#animation-callbacks) | ||
# Contents | ||
|
||
* [Quickstart example: Transitioning between two states](#example-transitioning-between-states). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not call it "quickstart", since I think of that as the example in the QuickStart section. Maybe just "Simple"? Or drop the word entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped "quickstart" in keeping with the other items in the list. Done.
figure | ||
img(src="/resources/images/devguide/animations/animation_basic_click.gif" alt="A simple transition animation" align="right" style="width:220px;margin-left:20px" ) | ||
:marked | ||
Let's build a simple animation that transitions an element between two states | ||
Build a simple animation that transitions an element between two states |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not crazy about phrasing this as a command, since they don't know how to do this. I'd prefer "Let's build", but maybe you can think of something better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at your changes, I don't see this comment addressed yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Missed it! Changed it to "You can build..."
We now have an animation defined but it is not yet used anywhere. We can change that by | ||
attaching it to one or more elements in the component's template using the "`[@triggerName]`" | ||
syntax: | ||
Now, using the "`[@triggerName]`" syntax, attach the animation that you just defined to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's drop the " around [@triggerName]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
or `active`, since that's what we have defined animation states for. | ||
Here, the animation trigger applies to every element repeated by an `ngFor`. Each of | ||
the repeated elements animates independently. The value of the | ||
attribute is bound to the expression `hero.state`. It is always either `inactive` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. It is -> and is
(to improve flow, reduce choppiness)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
and decelerates during its runtime. For example, using an `ease-in` function means | ||
the animation begins relatively slowly but then picks up speed as it progresses. We | ||
and decelerates during its runtime. For example, an `ease-in` function causes | ||
the animation to begin relatively slowly and picks up speed as it progresses. You |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and picks -> but pick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
For each keyframe, we can specify an *offset* that defines at which point | ||
in the animation that keyframe applies. The offset is a number between zero, | ||
For each keyframe, you specify an *offset* that defines at which point | ||
in the animation keyframe applies. The offset is a number between zero, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyframe -> that keyframe
(or "the keyframe")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
figure | ||
img(src="/resources/images/devguide/animations/animation_groups.gif" alt="Parallel animations with different timings, implemented with groups" align="right" style="width:220px;margin-left:20px" ) | ||
:marked | ||
We've already seen how we can animate multiple style properties at the same time: | ||
Just put all of them into the same `style()` definition! | ||
You've seen how you to animate multiple style properties at the same time: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you to -> to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
For this we can use animation *groups*. In this example we use groups both on | ||
enter and leave so that we can use two different timing configurations. Both | ||
For this you can use animation *groups*. In this example, using groups both on | ||
enter and leave allow for two different timing configurations. Both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allow -> allows
(since it's "using", not "groups", that's the subject of this verb)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're good! Done. :)
For this we can use animation *groups*. In this example we use groups both on | ||
enter and leave so that we can use two different timing configurations. Both | ||
For this you can use animation *groups*. In this example, using groups both on | ||
enter and leave allow for two different timing configurations. Both | ||
are applied to the same element in parallel, but run independent of each other: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
independent -> independently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I was probably too picky, but in general this looks good. |
81b2bb9
to
3bb6dac
Compare
one or more elements in the component's template. | ||
|
||
+makeExample('animations/ts/app/hero-list-basic.component.ts', 'template')(format=".") | ||
|
||
:marked | ||
Here, the animation trigger applies to every element repeated by an `ngFor`. Each of | ||
the repeated elements animates independently. The value of the | ||
attribute is bound to the expression `hero.state`. It is always either `inactive` | ||
or `active`. | ||
attribute is bound to the expression `hero.state` and is always either `active`/`inactive`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ -> or
(/ can mean too many things, including division, and-or, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
figure | ||
img(src="/resources/images/devguide/animations/animation_basic_click.gif" alt="A simple transition animation" align="right" style="width:220px;margin-left:20px" ) | ||
:marked | ||
Let's build a simple animation that transitions an element between two states | ||
Build a simple animation that transitions an element between two states |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at your changes, I don't see this comment addressed yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 tiny comments, but this looks great. If you can fix these now before I commit, that'd be great. Otherwise, I'll commit and make the couple of changes myself.
the value as a string with the appropriate suffix: | ||
|
||
* `'50px'` | ||
* `'3em'` | ||
* `'100%'` | ||
|
||
Define most dimensional properties as a number in pixels: | ||
If you don't provide a unit when specifying dimension, Angular will assume the default of `px`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better wording! Nit:
will assume -> assumes
Copy edits for the Animations page.