【问题标题】:jquery Orgchart multiple trees or orgchartsjquery Orgchart 多棵树或 orgchart
【发布时间】:2012-10-12 17:47:32
【问题描述】:

我正在使用来自https://github.com/wesnolte/jOrgChart 的插件。它在显示单个组织结构图或层次结构方面做得非常出色。

我希望能够在两棵树之间“共享”节点。例如,我希望组织结构图 1 中的节点 A 移动到组织结构图 2。

我的实例化代码(CoffeeScript如下:

$ ->
  $(".org1").jOrgChart
    dragAndDrop: true
    chartElement: "#chartArea1"

  $(".org2").jOrgChart
    dragAndDrop: true
    chartElement: "#chartArea2"

但是,将元素从 org1 拖动到 org 2 不会更新任一树。 注意:如果我将两棵树放在同一个 chartElement 下(即 div id="chartArea1"),则只显示一棵树,这就是它们位于不同 chartElements 中的原因。

【问题讨论】:

    标签: jquery jquery-plugins orgchart


    【解决方案1】:

    使用以下流程:

    • 三个图表(parentChart、chartArea1、chartArea2)
    • 在 parentChart 上使用 dragAndDrop: true
    • 使用 chartArea1 和 chartArea2 作为 parentChart 的子项

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-16
      • 1970-01-01
      • 2018-02-28
      • 1970-01-01
      相关资源
      最近更新 更多