Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrepolischuk/magnifier
Magnifier an image
https://github.com/andrepolischuk/magnifier
image lens loupe magnifier
Last synced: about 2 months ago
JSON representation
Magnifier an image
- Host: GitHub
- URL: https://github.com/andrepolischuk/magnifier
- Owner: andrepolischuk
- License: mit
- Created: 2015-06-22T19:08:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T13:20:46.000Z (over 7 years ago)
- Last Synced: 2024-09-07T06:53:29.457Z (4 months ago)
- Topics: image, lens, loupe, magnifier
- Language: JavaScript
- Homepage: http://andrepolischuk.github.io/magnifier
- Size: 2.59 MB
- Stars: 15
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# magnifier [![Build Status][travis-image]][travis-url]
> Magnifier an image
![](screenshot.png)
## Install
```sh
npm install --save magnifier
```## Usage
```js
import Magnifier from 'magnifier';new Magnifier('.image');
```## API
### new Magnifier(image)
Create a new `Magnifier` instance.
#### image
Type: `element`, `string`
Image for magnification.
### .height(h)
#### h
Type: `number`, `string`
Lens height.
### .width(h)
#### h
Type: `number`, `string`
Lens width.
### .backgroundColor(color)
#### color
Type: `string`
Lens background color.
### .borderColor(color)
#### color
Type: `string`
Lens border color.
### .borderRadius(r)
#### r
Type: `number`, `string`
Lens radius.
### .borderWidth(w)
#### w
Type: `number`, `string`
Lens border width.
### .className(name)
#### name
Type: `string`
Lens class name.
### .show()
Forced show lens.
### .hide()
Forced hide lens.
### .destroy()
Unbinds the event handlers and removes the lense.
## License
MIT
[travis-url]: https://travis-ci.org/andrepolischuk/magnifier
[travis-image]: https://travis-ci.org/andrepolischuk/magnifier.svg?branch=master