Dependencies

Add support for dependency links between tasks using jsPlumb.

Dependency

jsPlumb

Usage

angular.module('myApp', ['gantt', 'gantt.dependencies']);
<div gantt>
    <gantt-dependencies enabled="true"
                        read-only="false"
                        js-plumb-defaults="{
                                         Endpoint: ['Dot', {radius: 7}],
                                         Connector: 'Flowchart'
                                         }"
                        endpoints="[...]"
                        fallback-endpoints="[...]">
    </gantt-dependencies>
</div>

Attributes

Model

Task can specify a dependencies field containing a single or a list of objects.

Each object defines the opposite side or the dependency, using either from or to property. connectParameters field can optionnaly be set to an object that will be used for each related jsPlumb.connect(...) function call.

{
  ...
  // Inside Task object
  'dependencies': [{
    'from': <taskId>,
    'connectParameters': {...} // Parameters given to jsPlumb.connect() function call.
  }]
}

{
  ...
  // Inside Task object
  'dependencies': [{
    'to': <taskId>,
    'connectParameters': {...} // Parameters given to jsPlumb.connect() function call.
  }]
}

{
  ...
  // Inside Task object or Row object
  'dependencies': false // Disable dependencies support for this task or row
}

API

Methods

Refresh the view with dependencies data from the model. tasks is an array of Task objects to refresh, or undefined to refresh the whole chart.

Events

A dependency was created, removed or changed.