From 765d28e08df7825427c05154b3fa2af1cfd7ff13 Mon Sep 17 00:00:00 2001 From: AdaskoTheBeAsT Date: Sat, 4 Oct 2014 15:02:16 +0200 Subject: [PATCH] added new clear the buffer function added new clear the buffer function --- jstree/jstree-tests.ts | 2 ++ jstree/jstree.d.ts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/jstree/jstree-tests.ts b/jstree/jstree-tests.ts index aa834e6217..e059589a6f 100644 --- a/jstree/jstree-tests.ts +++ b/jstree/jstree-tests.ts @@ -75,6 +75,8 @@ a.search('test', false, true); //test redraw node a.redraw_node($('#node1'), false, false, false); +//test clear buffer +a.clear_buffer(); //tree with new unique plugin parameters var treeWithUnique = $('#treeWithUnique').jstree({ diff --git a/jstree/jstree.d.ts b/jstree/jstree.d.ts index 28297e5552..689232104b 100644 --- a/jstree/jstree.d.ts +++ b/jstree/jstree.d.ts @@ -1059,6 +1059,13 @@ interface JSTree extends JQuery { */ paste: (obj: any, pos: any) => void; + /** + * clear the buffer of previously copied or cut nodes + * @name clear_buffer() + * @trigger clear_buffer.jstree + */ + clear_buffer: () => void; + /** * put a node in edit mode (input field to rename the node) * @name edit(obj [, default_text]) @@ -1223,7 +1230,16 @@ interface JSTree extends JQuery { */ is_undetermined: (obj: any) => boolean; + /** + * called when a node is selected by the user. Used internally. + * @private + * @name activate_node(obj, e) + * @param {mixed} obj the node + * @param {Object} e the related event + * @trigger activate_node.jstree, changed.jstree + */ activate_node: (obj: any, e: any) => any; + /** * check a node (only if tie_selection in checkbox settings is false, otherwise select_node will be called internally) * @name check_node(obj)