From 6e2cb9f90e02ff2dd76342101699f9f150c57068 Mon Sep 17 00:00:00 2001 From: Navneet Date: Wed, 30 Oct 2019 17:39:07 -0400 Subject: [PATCH 1/2] Added Bounds in Documentation --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 819d5b7..badf76a 100644 --- a/README.md +++ b/README.md @@ -312,6 +312,19 @@ panzoom(element, { }); ``` +## Bounds on Panzoom + +By default panzoom will not prevent Image from Panning out of the Container. `bounds` (boolean) and +`boundsPadding` (number) can be defined so that it doesn't fall out. Default value for `boundsPadding` is `0.05` . + + +``` js +panzoom(element, { + bounds: true, + boundsPadding: 0.1 +}); +``` + # license MIT From 309b9583b5238d612210541a7c7e1d0955e0efaa Mon Sep 17 00:00:00 2001 From: Navneet Date: Wed, 30 Oct 2019 17:45:06 -0400 Subject: [PATCH 2/2] Added moveTo in Documentation --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index badf76a..730ea94 100644 --- a/README.md +++ b/README.md @@ -325,6 +325,14 @@ panzoom(element, { }); ``` +## Triggering Pan + +To Pan the object using Javascript use `moveTo(,)` function . It expects x, y value to where to move. + +``` js +panzoom.moveTo(0, 0); +``` + # license MIT