Skip to content

Commit

Permalink
Fix copying children elements
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsfy committed Jun 29, 2016
1 parent 07e3e55 commit 501c8ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cytoscape-clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@
var fields = ["source", "target", "parent"];
for (var k = 0; k < fields.length; k++) {
var field = fields[k];
if (json.data[field])
if (json.data[field] && oldIdToNewId[json.data[field]]){
json.data[field] = oldIdToNewId[json.data[field]];
if (field == "parent")
console.log(json.data[field], oldIdToNewId[json.data[field]]);
}

}
if (json.position.x) {
Expand Down

0 comments on commit 501c8ef

Please sign in to comment.