Commit 1aa0b501 authored by Akikonata's avatar Akikonata

Merge branch 'dev' of https://github.com/kitygraph/kityminder into dev

parents 1bf34614 c7c2b2a2
......@@ -189,7 +189,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
},
clone:function(){
function cloneNode(parent,isClonedNode){
var _tmp = new KM.MinderNode(isClonedNode.getData());
var _tmp = new KM.MinderNode();
_tmp.data = utils.clonePlainObject(isClonedNode.getData());
_tmp.parent = parent;
if(parent){
parent.children.push(_tmp);
......
......@@ -117,7 +117,7 @@ var utils = Utils = KityMinder.Utils = {
tmp = source[i];
if (utils.isObject(tmp) || utils.isArray(tmp)) {
target[i] = utils.isArray(tmp) ? [] : {};
utils.clone(source[i], target[i])
utils.clonePlainObject(source[i], target[i])
} else {
target[i] = tmp;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment