JsTree v3.0 drag and drop plugin. Reference target node upon dropping

后端 未结 8 939
南笙
南笙 2021-01-12 09:30

I use drag and drop plugin of jsTree library (ver. 3.0) With the following code I can bind to the end of drag\'n\'drop action, but I can not see a way to get the reference t

8条回答
  •  忘掉有多难
    2021-01-12 10:18

    you just need to call:

    'check_callback': function(operation, node, node_parent, node_position, more) {
      // operation can be 'create_node', 'rename_node', 'delete_node', 'move_node' or 'copy_node'
    
      if (operation === "move_node") {
          var node = more.origin.get_node('fiche-1');
          return true;
      }
    
      return true; //allow all other operations
    }

提交回复
热议问题