项目作者: joyfulljs

项目描述 :
make element scalable by mouse wheel. it can take the current mouse position as the transform origin.
高级语言: TypeScript
项目地址: git://github.com/joyfulljs/scalable.git
创建时间: 2020-02-24T02:10:27Z
项目社区:https://github.com/joyfulljs/scalable

开源协议:

下载


make element scalable by mouse wheel

useage

  1. import Scalable from '@joyfulljs/scalable';
  2. // ...
  3. mount(){
  4. this.instance = new Scalale(this.refs.el, {
  5. followMouse: true,
  6. maxScale: 5,
  7. minScale: 1,
  8. onScaleChange: ( { scale } )=>{ console.log(scale) }
  9. });
  10. },
  11. active(){
  12. // if need to reset to origin state
  13. this.instance.reset()
  14. },
  15. unmount(){
  16. this.instance.destroy()
  17. }
  18. // ...

api

docs

LICENSE

MIT