Skip to content

Commit 28f53c5

Browse files
authored
Merge pull request #241 from moklick/patch-1
docs(readme): use instance instead of panzoom
2 parents bdd7f72 + 3349a1a commit 28f53c5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ panzoom(element, {
190190
To get the current zoom (scale) level use the `getTransform()` method:
191191

192192
```
193-
console.log(panzoom.getTransform()); // prints {scale: 1.2, x: 10, y: 10}
193+
console.log(instance.getTransform()); // prints {scale: 1.2, x: 10, y: 10}
194194
```
195195

196196
## Fixed transform origin when zooming
@@ -395,13 +395,13 @@ panzoom(element, {
395395
To Pan the object using Javascript use `moveTo(<number>,<number>)` function. It expects x, y value to where to move.
396396

397397
``` js
398-
panzoom.moveTo(0, 0);
398+
instance.moveTo(0, 0);
399399
```
400400

401401
To pan in a smooth way use `smoothMoveTo(<number>,<number>)`:
402402

403403
``` js
404-
panzoom.smoothMoveTo(0, 0);
404+
instance.smoothMoveTo(0, 0);
405405
```
406406

407407

@@ -410,13 +410,13 @@ panzoom.smoothMoveTo(0, 0);
410410
To Zoom the object using Javascript use `zoomTo(<number>,<number>,<number>)` function. It expects x, y value as coordinates of where to zoom. It also expects the zoom factor as the third argument. If zoom factor is greater than 1, apply zoom IN. If zoom factor is less than 1, apply zoom OUT.
411411

412412
``` js
413-
panzoom.zoomTo(0, 0, 2);
413+
instance.zoomTo(0, 0, 2);
414414
```
415415

416416
To zoom in a smooth way use `smoothZoom(<number>,<number>,<number>)`:
417417

418418
``` js
419-
panzoom.smoothZoom(0, 0, 0.5);
419+
instance.smoothZoom(0, 0, 0.5);
420420
```
421421

422422
# license

0 commit comments

Comments
 (0)