setting.view.dblClickExpand.html 1.9 KB

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