Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Require trigger="visibility" to run an <amp-story-animation> effect #28257

Merged
merged 6 commits into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/amp-story/amp-story-animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
fly-in with animate-in, after the previous element
</div>
</amp-story-grid-layer>
<amp-story-animation layout="nodisplay">
alanorozco marked this conversation as resolved.
Show resolved Hide resolved
<amp-story-animation trigger="in">
<script type="application/json">
{
"selector": ".animate",
Expand All @@ -59,7 +59,7 @@
fly-in with animate-in, after the previous element
</div>
</amp-story-grid-layer>
<amp-story-animation layout="nodisplay">
<amp-story-animation trigger="in">
<script type="application/json">
{
"selector": ".animate",
Expand All @@ -80,7 +80,7 @@
<div class="box animate-bottom"></div>
<div class="box animate-right"></div>
</amp-story-grid-layer>
<amp-story-animation layout="nodisplay">
<amp-story-animation trigger="in">
<script type="application/json">
[
{
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-story/1.0/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ export class AnimationManager {
)
.concat(
Array.prototype.map.call(
childElementsByTag(this.page_, 'amp-story-animation'),
this.page_.querySelectorAll('amp-story-animation[trigger=in]'),
(el) =>
this.createRunner_({
source: el,
Expand Down