setting.view.dblClickExpand.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>dblClickExpand</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
  5. <div class="desc">
  6. <p></p>
  7. <div class="longdesc">
  8. <p>When double-click the parent node, 'dblClickExpand' is used to decide whether to expand the parent node.</p>
  9. <p>Default: true</p>
  10. </div>
  11. </div>
  12. <h3>Boolean Format</h3>
  13. <div class="desc">
  14. <p> true means: When double-click the parent node, zTree will expand the parent node.</p>
  15. <p> false means: When double-click the parent node, zTree will not expand the parent node.</p>
  16. </div>
  17. <h3>Function Pamameter Descriptions</h3>
  18. <div class="desc">
  19. <h4><b>treeId</b><span>String</span></h4>
  20. <p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
  21. <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
  22. <p>JSON data object of the node which be double-clicked.</p>
  23. <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
  24. <p>Return value is same as 'Boolean Format'</p>
  25. </div>
  26. <h3>Example of setting</h3>
  27. <h4>1. When double-click the parent node, zTree will not expand the parent node.</h4>
  28. <pre xmlns=""><code>var setting = {
  29. view: {
  30. dblClickExpand: false
  31. }
  32. };
  33. ......</code></pre>
  34. <h4>2. When double-click the parent node, zTree will expand the parent node which level>0.</h4>
  35. <pre xmlns=""><code>function dblClickExpand(treeId, treeNode) {
  36. return treeNode.level > 0;
  37. };
  38. var setting = {
  39. view: {
  40. dblClickExpand: dblClickExpand
  41. }
  42. };
  43. ......</code></pre>
  44. </div>
  45. </div>