https://github.com/paraboly/pwc-zoom-control
Advance zoom control
https://github.com/paraboly/pwc-zoom-control
Last synced: about 1 year ago
JSON representation
Advance zoom control
- Host: GitHub
- URL: https://github.com/paraboly/pwc-zoom-control
- Owner: Paraboly
- License: mit
- Created: 2019-12-22T13:44:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:30:26.000Z (over 3 years ago)
- Last Synced: 2025-02-15T14:54:16.697Z (over 1 year ago)
- Language: TypeScript
- Size: 288 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README


[](https://github.com/Paraboly/project-name)
[](https://www.npmjs.com/package/@paraboly/project-name)
[](https://www.npmjs.com/package/@paraboly/project-name)

[](https://opensource.org/licenses/MIT)
## [Live Codepen Example](https://codepen.io/wrathchaos/pen/dyyvRzM)
## Installation
### Script tag
- Put two script tags similar to this in the head of your index.html:
```html
```
- Then you can use the element anywhere in your template, JSX, html etc
### Node Modules
- Run `npm install @paraboly/pwc-zoom-control --save`
- Put a script tag similar to this `` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
### In a stencil-starter app
- Run `npm install @paraboly/pwc-zoom-control --save`
- Add an import to the npm packages `import @paraboly/pwc-zoom-control;`
- Then you can use the element anywhere in your template, JSX, html etc
# Usage
```html
```
```js
const pwcZoomControl = document.querySelector("pwc-zoom-control");
pwcZoomControl.addEventListener("controlTriggered", event =>
console.log(event.details)
);
```
# Details
## Properties
| Property | Attribute | Description | Type | Default |
| --------------- | ----------------- | --------------------------------------- | -------- | ------- |
| `maxZoom` | `max-zoom` | Max zoom for the zoom control. | `string` | `"18"` |
| `minZoom` | `min-zoom` | Min zoom for the zoom control. | `string` | `"1"` |
| `zoom` | `zoom` | Current zoom of the zoom control. | `string` | `"10"` |
| `zoomRangeStep` | `zoom-range-step` | Zoom step for zoom range. | `string` | `"0.1"` |
| `zoomStep` | `zoom-step` | Zoom step for zoom-in zoom-out buttons. | `string` | `"1"` |
## Events
| Event | Description | Type |
| ------------------ | ------------------------------------------------------------------------------- | ------------------ |
| `controlTriggered` | Event which is triggered when there is any change on the zoom and pan controls. | `CustomEvent` |
## Authors
SchemeSonic, haldun.yildiz@paraboly.com | haldun313@gmail.com
## License
WebComponent PWC README Boilerplate is available under the MIT license.
See the LICENSE file for more info.