Skip to content

Releases: timmywil/panzoom

contain: invert

08 Jul 18:31
Compare
Choose a tag to compare
  • The inverted containment option has been added.

Imagine your panzoom element is an image tag that spans the entire page. When contain: true is set, the image can never pan because the image is the same size as its parent. Instead, set contain: invert when initializing panzoom and you can pan the element whenever it is zoomed in. The image won't pan off-screen and you'll never see anything behind that image.