nico-zoom
v1.0.4
Published
An image zoom viewer like medium article effect
Downloads
2
Readme
image-zoom
a medium like image zoom plugin
Features
Small
No other deps
Installation
$ npm install --save nico-zoom
Getting started
<script src="./dist/NZoom.min.js"></script>
<script>
window.onload = function() {
var container = document.querySelector('.content')
new NZoom(container, {
gutter: 30,
scrollOffset: 10,
overlayBg: '#ffffff',
scaleFactor: 1,
beforeZoomIn: () => {},
afterZoomIn: () => {},
beforeZoomOut: () => {},
afterZoomOut: () => {}
})
}
</script>
import NZoom from 'nico-zoom'
new NZoom(document.querySelector('.content'), {
gutter: 30,
scrollOffset: 10,
overlayBg: '#ffffff',
scaleFactor: 1,
beforeZoomIn: () => {},
afterZoomIn: () => {},
beforeZoomOut: () => {},
afterZoomOut: () => {}
})