1.0.2 • Published 4 years ago

@joyfulljs/scalable v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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

docs

# LICENSE

MIT