Class: drag
vui 拖拽
View source: drag.js.
Arguments:
vui.drag (obj, options)
- obj - (Object) 主对象
- options - (Object) 组件配置
- options.lockX - (Boolean) false 锁定X
- options.lockY - (Boolean) false 锁定Y
- options.start - (Function) null 开始拖动回调
- options.drag - (Function) null 拖动中回调
- options.end - (Function) null 结束拖动回调
- options.maxLeft - (Number) null max left
- options.maxRight - (Number) null max right
- options.maxTop - (Number) null max top
- options.maxBottom - (Number) null max bottom
Example:
vui.drag($('.content'),{ lockX:true, maxTop:0, maxBottom:200 });