Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wgr-sa/nuxt-panzoom

Add zooming and panning functionality to your application
https://github.com/wgr-sa/nuxt-panzoom

nuxt nuxt3 panzoom

Last synced: about 1 month ago
JSON representation

Add zooming and panning functionality to your application

Awesome Lists containing this project

README

        

# Nuxt-panzoom Module

nuxt-panzoom is a simple and easy to use Nuxt 3 module that makes it easy to add zooming and panning functionality to your application. It's built on top of the [panzoom]((https://github.com/timmywil/panzoom)) library and provides a Vue.js directive that can be used to zoom any element in your template.

## Installation
You can install the module by running the following command:

`npm install @wgr-sa/nuxt-panzoom`

## Usage
Add nuxt-panzoom to the modules section of your nuxt.config.js file:
```
export default {
modules: [
'@wgr-sa/nuxt-panzoom'
],
panzoom: {
addControls: true, // Add PanzoomControls component
}
}
```

In your template, add the panzoom directive to the element you want to make zoomable.
```



```

The v-panzoom directive accepts an options object. You can find all the options available in the panzoom library documentation https://github.com/timmywil/panzoom

## `PanzoomControls`

`PanzoomControls` is a simple controls component. Put it anywhere and pass the element in props. It will show simple zoomIn, zoomOut and reset buttons
```






```

## Development

- Run `npm run dev:prepare` to generate type stubs.
- Use `npm run dev` to start [playground](./playground) in development mode.