We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 460ce19 + 309b958 commit b8c8bcbCopy full SHA for b8c8bcb
README.md
@@ -312,6 +312,27 @@ panzoom(element, {
312
});
313
```
314
315
+## Bounds on Panzoom
316
+
317
+By default panzoom will not prevent Image from Panning out of the Container. `bounds` (boolean) and
318
+`boundsPadding` (number) can be defined so that it doesn't fall out. Default value for `boundsPadding` is `0.05` .
319
320
321
+``` js
322
+panzoom(element, {
323
+ bounds: true,
324
+ boundsPadding: 0.1
325
+});
326
+```
327
328
+## Triggering Pan
329
330
+To Pan the object using Javascript use `moveTo(<number>,<number>)` function . It expects x, y value to where to move.
331
332
333
+panzoom.moveTo(0, 0);
334
335
336
# license
337
338
MIT
0 commit comments