From e4d41cd058048fa568d0628dd940d4e19569ca05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 13 Sep 2017 17:55:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96drag=E6=8F=92=E4=BB=B6,?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E5=8F=AF=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/lib/drag/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/lib/drag/main.js b/js/lib/drag/main.js index fd8ad47..624b3d5 100644 --- a/js/lib/drag/main.js +++ b/js/lib/drag/main.js @@ -118,7 +118,10 @@ define(['yua'], function(){ //拖拽前回调 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个值依次是: 上, 下, 左, 右