Skip to content

Commit fdfb823

Browse files
committed
update readme
1 parent 358b58c commit fdfb823

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,11 @@ $('#btn-delete-nodes').on('click', function() {
352352

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

355-
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.
355+
Users are allowed to drag & drop the nodes of orgchart when option "draggable" is assigned to true.
356+
357+
![drag & drop](http://dabeng.github.io/OrgChart/drag-drop/recorder.gif)
358+
359+
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.
356360
```js
357361
// sample of core source code
358362
$('#chart-container').orgchart({
@@ -368,8 +372,6 @@ $('#chart-container').orgchart({
368372
})
369373
```
370374

371-
![drag & drop](http://dabeng.github.io/OrgChart/drag-drop/recorder.gif)
372-
373375
- **[I want a method that can decribe the hierarchy of orgchart](http://dabeng.github.io/OrgChart/get-hierarchy/)**
374376

375377
That's where getHierarchy() comes in.
@@ -542,6 +544,9 @@ $('#chartContainerId').orgchart(options);
542544
<tr>
543545
<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>
544546
</tr>
547+
<tr>
548+
<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>
549+
</tr>
545550
</tbody>
546551
</table>
547552

0 commit comments

Comments
 (0)