mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
move_node copy_node fixed
move_node copy_node fixed
This commit is contained in:
@@ -104,3 +104,8 @@ var treeWithNewCheckboxProperties = $('#treeWithNewCheckboxProperties').jstree({
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var tree = $('a').jstree();
|
||||
tree.move_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true);
|
||||
tree.copy_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true);
|
||||
|
||||
|
||||
Vendored
+4
-2
@@ -1004,9 +1004,10 @@ interface JSTree extends JQuery {
|
||||
* @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0`
|
||||
* @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position
|
||||
* @param {Boolean} internal parameter indicating if the parent node has been loaded
|
||||
* @param {Boolean} internal parameter indicating if the tree should be redrawn
|
||||
* @trigger move_node.jstree
|
||||
*/
|
||||
move_node: (obj: any, par: any, pos?: any, callback?: any, internal?: boolean) => void;
|
||||
move_node: (obj: any, par: any, pos?: any, callback?: (node: any, new_par: any, pos: any) => void, is_loaded?: boolean, skip_redraw?: boolean) => void;
|
||||
|
||||
/**
|
||||
* copy a node to a new parent
|
||||
@@ -1016,9 +1017,10 @@ interface JSTree extends JQuery {
|
||||
* @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0`
|
||||
* @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position
|
||||
* @param {Boolean} internal parameter indicating if the parent node has been loaded
|
||||
* @param {Boolean} internal parameter indicating if the tree should be redrawn
|
||||
* @trigger model.jstree copy_node.jstree
|
||||
*/
|
||||
copy_node: (obj: any, par: any, pos?: any, callback?: any, internal?: boolean) => void;
|
||||
copy_node: (obj: any, par: any, pos?: any, callback?: (node: any, new_par: any, pos: any) => void, is_loaded?: boolean, skip_redraw?: boolean) => void;
|
||||
|
||||
/**
|
||||
* cut a node (a later call to `paste(obj)` would move the node)
|
||||
|
||||
Reference in New Issue
Block a user