vui document

Class: drag

vui 拖拽

Author: putaoshu@126.com.
View source: drag.js.

Arguments:

vui.drag (obj, options)

  1. obj - (Object) 主对象
  2. options - (Object) 组件配置
  3. options.lockX - (Boolean) false 锁定X
  4. options.lockY - (Boolean) false 锁定Y
  5. options.start - (Function) null 开始拖动回调
  6. options.drag - (Function) null 拖动中回调
  7. options.end - (Function) null 结束拖动回调
  8. options.maxLeft - (Number) null max left
  9. options.maxRight - (Number) null max right
  10. options.maxTop - (Number) null max top
  11. options.maxBottom - (Number) null max bottom

Example:

vui.drag($('.content'),{
	 lockX:true,
	 maxTop:0,
	 maxBottom:200
});