0.3.1 • Published 5 years ago

jo-dragin-resize v0.3.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

dragin-resize

拖拽边框,改变元素大小

在项目中安装

npm install jo-dragin-resize --save
# 或
yarn add jo-dragin-resize

使用

import util from 'jo-util';
import DraginResize from './dragin-resize.js';

new DraginResize(util.getEls('.box')[0], {
  clone: true,
  start(x, y) {
    console.log('start', x, y);
  },
  move(info) {
    console.log('move', info);
  },
  end(info) {
    console.log('end', info);

    if (info.dir == 'ver') {
      this.elem.style.height = info.height + 'px';
    }
    else if (info.dir == 'hor') {
      this.elem.style.width = info.width + 'px';
    }
  }
})
0.3.0

5 years ago

0.3.1

5 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago