Skip to content

Commit

Permalink
✨ [Panning media] Add lock-bounds attribute (#33197)
Browse files Browse the repository at this point in the history
* Implementation sketch.

* Remove implementaion comments.

* Factor in zoom.

* Test with left and right

* Calculate X.

* calc y

* Update example. Only calculate if lock-bounds.

* Tabbing in html template.

* Add comment for percentScaled

* css spaces.

* Clamp values if lock-bounds.

* Add comment.

* Handle page resize

* maxbounds method and variable. Tests.

* Private variable

* template css update

* Update comment.

* Const for distance to center edge.

* Get page size from store

* lint

* rebase

* Implementation sketch.

* Remove implementaion comments.

* Factor in zoom.

* Test with left and right

* Calculate X.

* calc y

* Update example. Only calculate if lock-bounds.

* Tabbing in html template.

* Add comment for percentScaled

* css spaces.

* Clamp values if lock-bounds.

* Add comment.

* Handle page resize

* maxbounds method and variable. Tests.

* Private variable

* template css update

* Update comment.

* Const for distance to center edge.

* Get page size from store

* lint

* fix merge conflicts.

* Template

* Update comment.

* Revert template change.

* Update template

* Update tests

* Optional chaining on matches.

* Set page size in beforEach

* Update extensions/amp-story-panning-media/0.1/amp-story-panning-media.js

Co-authored-by: Enrique Marroquin <5449100+Enriqe@users.noreply.github.com>

* Update typedef name. Add percentage.

* lock-bounds codepath.

* Revise comment.

* call animate directly

* Remove private variable for maxBounds.

* Throw error if no height or width and using lock-bounds.

* Read transform in tests.

* Add TAG to user error.

* Basic readme.

* Revert readme

* Calculation refactor.

* Rename percent scaled variable in getmaxbounds.

Co-authored-by: Enrique Marroquin <5449100+Enriqe@users.noreply.github.com>
  • Loading branch information
processprocess and Enriqe committed Mar 23, 2021
1 parent f74b277 commit 426eb69
Show file tree
Hide file tree
Showing 3 changed files with 463 additions and 192 deletions.

0 comments on commit 426eb69

Please sign in to comment.