Code Review
/
portal.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
nexus site path corrected
[portal.git]
/
ecomp-portal-FE
/
client
/
bower_components
/
jqTree
/
_entries
/
21_oncanmove.md
1
---
2
title: onCanMove
3
name: options-oncanmove
4
---
5
6
You can override this function to determine if a node can be moved.
7
8
{% highlight js %}
9
$('#tree1').tree({
10
data: data,
11
dragAndDrop: true,
12
onCanMove: function(node) {
13
if (! node.parent.parent) {
14
// Example: Cannot move root node
15
return false;
16
}
17
else {
18
return true;
19
}
20
}
21
});
22
{% endhighlight %}