You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -190,7 +190,7 @@ panzoom(element, {
190
190
To get the current zoom (scale) level use the `getTransform()` method:
191
191
192
192
```
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}
194
194
```
195
195
196
196
## Fixed transform origin when zooming
@@ -395,13 +395,13 @@ panzoom(element, {
395
395
To Pan the object using Javascript use `moveTo(<number>,<number>)` function. It expects x, y value to where to move.
396
396
397
397
```js
398
-
panzoom.moveTo(0, 0);
398
+
instance.moveTo(0, 0);
399
399
```
400
400
401
401
To pan in a smooth way use `smoothMoveTo(<number>,<number>)`:
402
402
403
403
```js
404
-
panzoom.smoothMoveTo(0, 0);
404
+
instance.smoothMoveTo(0, 0);
405
405
```
406
406
407
407
@@ -410,13 +410,13 @@ panzoom.smoothMoveTo(0, 0);
410
410
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.
411
411
412
412
```js
413
-
panzoom.zoomTo(0, 0, 2);
413
+
instance.zoomTo(0, 0, 2);
414
414
```
415
415
416
416
To zoom in a smooth way use `smoothZoom(<number>,<number>,<number>)`:
0 commit comments