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

✨ [Panning media] Add lock-bounds attribute #33197

Merged
merged 66 commits into from
Mar 23, 2021

Conversation

processprocess
Copy link
Contributor

@processprocess processprocess commented Mar 10, 2021

Adds

  • lock-bounds attribute that prevents image from moving beyond viewport.
  • getMaxBounds_ to calculate max transforms.
  • Resize listener to recalculate & animate bounds.
  • Add Test for lock-bounds calculation.

Demo

Context / Fixes #31522

@amp-owners-bot
Copy link

amp-owners-bot bot commented Mar 10, 2021

Hey @gmajoulet, @newmuis! These files were changed:

extensions/amp-story-panning-media/0.1/amp-story-panning-media.js
extensions/amp-story-panning-media/0.1/test/test-amp-story-panning-media.js

@processprocess processprocess marked this pull request as draft March 11, 2021 17:06
@processprocess processprocess marked this pull request as ready for review March 11, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Panning media] locked-bounds attribute
4 participants