Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [Panning media] Add lock-bounds attribute (#33197)
* 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