Sha256: 0bfc3ef93742d23a9bd687cdd166a654a62791a6929f56b7136c31df3ad21a76

Contents?: true

Size: 518 Bytes

Versions: 7

Compression:

Stored size: 518 Bytes

Contents

---
title: onCanMoveTo
name: options-oncanmoveto
---

You can override this function to determine if a node can be moved to a certain position.

{% highlight js %}
$('#tree1').tree({
    data: data,
    dragAndDrop: true,
    onCanMoveTo: function(moved_node, target_node, position) {
        if (target_node.is_menu) {
            // Example: can move inside menu, not before or after
            return (position == 'inside');
        }
        else {
            return true;
        }
    }
});
{% endhighlight %}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iqvoc-4.12.1 vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md
iqvoc-4.12.0 vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md
iqvoc-4.11.1 vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md
iqvoc-4.11.0 vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md
iqvoc-4.10.0 vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md
iqvoc-4.9.0 vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md
iqvoc-4.8.2 vendor/assets/bower_components/jqtree/_entries/20_oncanmoveto.md