setting.callback.onDragMove.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDragMove</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span
  5. class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
  6. <div class="desc">
  7. <p></p>
  8. <div class="longdesc">
  9. <p>Used to capture the drag-move event when drag & drop node.</p>
  10. <p class="highlight_red">Mainly used to capture the DOM which the nodes was drag in. </p>
  11. <p>Default: null</p>
  12. </div>
  13. </div>
  14. <h3>Function Parameter Descriptions</h3>
  15. <div class="desc">
  16. <h4><b>event</b><span>js event Object</span></h4>
  17. <p>event Object</p>
  18. <h4 class="topLine"><b>treeId</b><span>String</span></h4>
  19. <p>zTree unique identifier: <b class="highlight_red">treeId</b>, the id of the containing tree.</p>
  20. <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
  21. <p>A collection of the nodes which will be dragged</p>
  22. </div>
  23. <h3>Examples of setting & function</h3>
  24. <h4>1. When drag nodes, output the target dom.</h4>
  25. <pre xmlns=""><code>function myOnDragMove(event, treeId, treeNodes) {
  26. console.log(event.target);
  27. };
  28. var setting = {
  29. callback: {
  30. onDragMove: myOnDragMove
  31. }
  32. };
  33. ......</code></pre>
  34. </div>
  35. </div>