2014-04-04 53 views
1

我使用兩個不同的樹限制jstree從一棵樹拖動到其他樹

  • 樹1

    • 一個
    • Ç
  • Ť ree2

    • A1
    • B1
    • C1

我使用拖放兩個樹中,我想限制從樹1拖動到Tree2

$('#tree1')。on('move_node.j stree',功能(事件,數據){ });

我怎樣才能讓一棵樹只

請幫助內的樹拖到解決這個

回答

1

我得到了解決,限制DND插件在jstree從github 處獲得最新的源這在check_callback

check_callback : function (o, n, p, pos, more) { 
    if(more && more.dnd && more.is_multi) { return false; } 
    return true; 
}