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

[amp-story] Allow more parameters for pan/zoom animations ✨ #20778

Merged
merged 7 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/amp-story/animations-presets.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h1>zoom-in</h1>
<!-- ## Zoom-Out -->
<amp-story-page id="zoom-out">
<amp-story-grid-layer template="fill">
<amp-img animate-in="zoom-out" animate-in-duration="4s" layout="responsive" src="https://picsum.photos/720/320?image=1026"
<amp-img animate-in="zoom-out" scale-start="3" scale-end="1" animate-in-duration="4s" layout="responsive" src="https://picsum.photos/720/320?image=1026"
width="720" height="320">
</amp-img>
</amp-story-grid-layer>
Expand All @@ -190,7 +190,7 @@ <h1>zoom-out</h1>
<!-- ## Pan-Left -->
<amp-story-page id="pan-left">
<amp-story-grid-layer template="fill">
<amp-img animate-in="pan-left" id="img-pan-left" animate-in-duration="4s" layout="fixed" src="https://picsum.photos/720/320?image=1026"
<amp-img animate-in="pan-left" id="img-pan-left" translate-x="600px" animate-in-duration="4s" layout="fixed" src="https://picsum.photos/720/320?image=1026"
width="720" height="320">
</amp-img>
</amp-story-grid-layer>
Expand All @@ -202,7 +202,7 @@ <h1>pan-left</h1>
<!-- ## Pan-Right -->
<amp-story-page id="pan-right">
<amp-story-grid-layer template="fill">
<amp-img animate-in="pan-right" animate-in-duration="4s" layout="fixed" src="https://picsum.photos/720/320?image=1026" width="720"
<amp-img animate-in="pan-right" animate-in-duration="4s" translate-x="200px" layout="fixed" src="https://picsum.photos/720/320?image=1026" width="720"
height="320">
</amp-img>
</amp-story-grid-layer>
Expand All @@ -214,7 +214,7 @@ <h1>pan-right</h1>
<!-- ## Pan-Up -->
<amp-story-page id="pan-up">
<amp-story-grid-layer template="fill">
<amp-img animate-in="pan-up" animate-in-duration="4s" layout="fixed" src="https://picsum.photos/720/320?image=1026" width="720"
<amp-img animate-in="pan-up" animate-in-duration="4s" translate-y="100px" layout="fixed" src="https://picsum.photos/720/320?image=1026" width="720"
height="320">
</amp-img>
</amp-story-grid-layer>
Expand All @@ -226,7 +226,7 @@ <h1>pan-up</h1>
<!-- ## Pan-Down -->
<amp-story-page id="pan-down">
<amp-story-grid-layer template="fill">
<amp-img animate-in="pan-down" animate-in-duration="4s" layout="fixed" src="https://picsum.photos/720/320?image=1026" width="720"
<amp-img animate-in="pan-down" animate-in-duration="4s" translate-y="100px" layout="fixed" src="https://picsum.photos/720/320?image=1026" width="720"
height="320">
</amp-img>
</amp-story-grid-layer>
Expand Down
4 changes: 2 additions & 2 deletions examples/amp-story/visual-effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="canonical" href="visual-effects.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-0.1.js"></script>
<script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
<style amp-custom>
amp-story-page {
font-family: 'Roboto', sans-serif;
Expand All @@ -33,7 +33,7 @@

<amp-story-page id="ken-burns-effect1">
<amp-story-grid-layer template="fill">
<div animate-in="zoom-in" animate-in-duration="30s" class="img-container">
<div animate-in="zoom-in" animate-in-duration="30s" scale-start="1" scale-end="3" class="img-container">
<amp-img id="ken-burns-img1" src="https://picsum.photos/1600/1200?image=1077" animate-in="pan-left" animate-in-duration="30s"
layout="fixed" width="1600" height="1200">
</amp-img>
Expand Down
Loading