@joyfulljs/scalable
v1.0.2
Published
make element scalable by nouse wheel
Downloads
2
Readme
make element scalable by mouse wheel
useage
import Scalable from '@joyfulljs/scalable';
// ...
mount(){
this.instance = new Scalale(this.refs.el, {
followMouse: true,
maxScale: 5,
minScale: 1,
onScaleChange: ( { scale } )=>{ console.log(scale) }
});
},
active(){
// if need to reset to origin state
this.instance.reset()
},
unmount(){
this.instance.destroy()
}
// ...
api
# LICENSE
MIT