Skip to content

Commit

Permalink
Added UI example for buttons
Browse files Browse the repository at this point in the history
As recommended in anvaka#78
  • Loading branch information
anvaka committed Jun 4, 2022
1 parent 3731bff commit d7b529c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,15 @@ To zoom in a smooth way use `smoothZoom(<number>,<number>,<number>)`:
instance.smoothZoom(0, 0, 0.5);
```

## Custom UI to trigger zoom

One of the common use case is to have a custom UI to trigger zoom. For example, you can use a button to zoom in/out.
Since this library does not depend on any popular framework (react, vue, etc.) you can implement it yourself
following this example:

* [Live demo](https://anvaka.github.io/panzoom/demo/buttons.html)
* [Source code of the demo](https://github.com/anvaka/panzoom/blob/3731bff2e15f2b4299405c2a59a24f30c3549a17/demo/buttons.html#L851)

# license

MIT

0 comments on commit d7b529c

Please sign in to comment.