app/assets/javascripts/fancytree/src/jquery.fancytree.clones.js in fancytree-rails-2.1.0.pre.0 vs app/assets/javascripts/fancytree/src/jquery.fancytree.clones.js in fancytree-rails-2.3.0
- old
+ new
@@ -7,12 +7,12 @@
* Copyright (c) 2014, Martin Wendt (http://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
- * @version 2.1.0
- * @date 2014-05-29T16:44
+ * @version 2.3.0
+ * @date 2014-08-17T10:39
*/
;(function($, window, document, undefined) {
"use strict";
@@ -204,11 +204,10 @@
};
/**
* [ext-clones] Update key and/or refKey for an existing node.
- * @param {FancytreeNode} [node]
* @param {string} key
* @param {string} refKey
* @returns {boolean}
*
* @alias FancytreeNode#reRegister
@@ -348,9 +347,14 @@
ctx.options.defaultKey = function(node){
return calcUniqueKey(node);
};
// The default implementation loads initial data
this._super(ctx);
+ },
+ treeClear: function(ctx){
+ ctx.tree.refMap = {};
+ ctx.tree.keyMap = {};
+ return this._super(ctx);
},
treeRegisterNode: function(ctx, add, node) {
var refList, len,
tree = ctx.tree,
keyMap = tree.keyMap,