Draw Task

Draw new tasks with the mouse.

Dependency

Requires movable plugin.

Usage

angular.module('myApp', ['gantt', 'gantt.drawtask']);
<div gantt>
    <gantt-draw-task enabled="true"
                   task-factory="drawTaskFactory">
    </gantt-draw-task>
</div>
$scope.drawTaskFactory = function() {
    var newTask = {
        id: 5,
        name: 'New Task'
        // Other properties
    }

    return newTask;
}

Attributes

Model

Attributes can be defined for a specific Row using an object property named drawTask

{
  ...
  // Inside Row or Task object
  // Full options object
  'drawTask': {
    'enabled': <Boolean>,
    'taskFactory': <Function>
  }

  // Or shortcut for enabled property
  'drawTask': <Boolean>
}

API

Events