Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dabeng committed Jun 28, 2016
1 parent 358b58c commit fdfb823
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ $('#btn-delete-nodes').on('click', function() {

- **[I wanna drag & drop the nodes of orgchart](http://dabeng.github.io/OrgChart/drag-drop/)**

Users are allowed to drag & drop the nodes of orgchart when option "draggable" is assigned to true. Furthermore, users can make use of option dropCriteria to inject their custom limitations on drag & drop. As shown below, we don't want an manager employee to be under a engineer under no circumstance.
Users are allowed to drag & drop the nodes of orgchart when option "draggable" is assigned to true.

![drag & drop](http://dabeng.github.io/OrgChart/drag-drop/recorder.gif)

Furthermore, users can make use of option dropCriteria to inject their custom limitations on drag & drop. As shown below, we don't want an manager employee to be under a engineer under no circumstance.
```js
// sample of core source code
$('#chart-container').orgchart({
Expand All @@ -368,8 +372,6 @@ $('#chart-container').orgchart({
})
```

![drag & drop](http://dabeng.github.io/OrgChart/drag-drop/recorder.gif)

- **[I want a method that can decribe the hierarchy of orgchart](http://dabeng.github.io/OrgChart/get-hierarchy/)**

That's where getHierarchy() comes in.
Expand Down Expand Up @@ -542,6 +544,9 @@ $('#chartContainerId').orgchart(options);
<tr>
<td>draggable</td><td>boolean</td><td>no</td><td>false</td><td>Users can drag & drop the nodes of orgchart if they enable this option</td>
</tr>
<tr>
<td>dropCriteria</td><td>function</td><td>no</td><td></td><td>Users can construct their own criteria to limit the relationships between dragged node and drop zone. Furtherly, this function accept three arguments(draggedNode, dragZone, dropZone) and just only return boolen values.</td>
</tr>
</tbody>
</table>

Expand Down

0 comments on commit fdfb823

Please sign in to comment.