diff options
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/jqTree/_entries/21_oncanmove.md')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/jqTree/_entries/21_oncanmove.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/jqTree/_entries/21_oncanmove.md b/ecomp-portal-FE/client/bower_components/jqTree/_entries/21_oncanmove.md new file mode 100644 index 00000000..ee19cf06 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/jqTree/_entries/21_oncanmove.md @@ -0,0 +1,22 @@ +--- +title: onCanMove +name: options-oncanmove +--- + +You can override this function to determine if a node can be moved. + +{% highlight js %} +$('#tree1').tree({ + data: data, + dragAndDrop: true, + onCanMove: function(node) { + if (! node.parent.parent) { + // Example: Cannot move root node + return false; + } + else { + return true; + } + } +}); +{% endhighlight %} |