diff --git a/demo/cn/exedit/drag_move.html b/demo/cn/exedit/drag_move.html
new file mode 100644
index 0000000..37a1a47
--- /dev/null
+++ b/demo/cn/exedit/drag_move.html
@@ -0,0 +1,119 @@
+
+
+
+ ZTREE DEMO - drag move
+
+
+
+
+
+
+
+
+
+
+
+ 拖拽节点基本控制
+ [ 文件路径: exedit/drag_move.html ]
+
+
+
diff --git a/demo/en/exedit/drag_move.html b/demo/en/exedit/drag_move.html
new file mode 100644
index 0000000..f8f08c0
--- /dev/null
+++ b/demo/en/exedit/drag_move.html
@@ -0,0 +1,119 @@
+
+
+
+ ZTREE DEMO - drag move
+
+
+
+
+
+
+
+
+
+
+
+ Basic control of dragging nodes
+ [ File path: exedit/drag_move.html ]
+
+
+
+
targetNode and moveType:
+
+
+
+
+
diff --git a/js/jquery.ztree.all.js b/js/jquery.ztree.all.js
index dbca0e5..ab3a5b2 100644
--- a/js/jquery.ztree.all.js
+++ b/js/jquery.ztree.all.js
@@ -2772,8 +2772,8 @@
tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
});
- o.bind(c.DRAGMOVE, function (event, srcEvent, treeId, treeNodes) {
- tools.apply(setting.callback.onDragMove, [srcEvent, treeId, treeNodes]);
+ o.bind(c.DRAGMOVE, function (event, srcEvent, treeId, treeNodes, targetNode, moveType) {
+ tools.apply(setting.callback.onDragMove, [srcEvent, treeId, treeNodes, targetNode, moveType]);
});
o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
@@ -3286,8 +3286,8 @@
}
preTmpTargetNodeId = tmpTargetNodeId;
preTmpMoveType = moveType;
-
- setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]);
+ var dragTargetNode = tmpTargetNodeId == null ? null : data.getNodeCache(targetSetting,tmpTargetNodeId);
+ setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes, dragTargetNode, moveType]);
}
return false;
}
diff --git a/js/jquery.ztree.exedit.js b/js/jquery.ztree.exedit.js
index cfa83ba..b279b01 100644
--- a/js/jquery.ztree.exedit.js
+++ b/js/jquery.ztree.exedit.js
@@ -101,8 +101,8 @@
tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
});
- o.bind(c.DRAGMOVE, function (event, srcEvent, treeId, treeNodes) {
- tools.apply(setting.callback.onDragMove, [srcEvent, treeId, treeNodes]);
+ o.bind(c.DRAGMOVE, function (event, srcEvent, treeId, treeNodes, targetNode, moveType) {
+ tools.apply(setting.callback.onDragMove, [srcEvent, treeId, treeNodes, targetNode, moveType]);
});
o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
@@ -615,8 +615,8 @@
}
preTmpTargetNodeId = tmpTargetNodeId;
preTmpMoveType = moveType;
-
- setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]);
+ var dragTargetNode = tmpTargetNodeId == null ? null : data.getNodeCache(targetSetting,tmpTargetNodeId);
+ setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes, dragTargetNode, moveType]);
}
return false;
}