优化drag插件,增加是否可拖拽判断
parent
f1f365e6e4
commit
e4d41cd058
|
@ -118,7 +118,10 @@ define(['yua'], function(){
|
||||||
|
|
||||||
//拖拽前回调
|
//拖拽前回调
|
||||||
if(_this.beforedrag){
|
if(_this.beforedrag){
|
||||||
_this.beforedrag.call(_this.vmodels, target, ox, oy)
|
var result = _this.beforedrag.call(_this.vmodels, target, ox, oy)
|
||||||
|
if(result === false){
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//限制区域, 4个值依次是: 上, 下, 左, 右
|
//限制区域, 4个值依次是: 上, 下, 左, 右
|
||||||
|
|
Reference in New Issue