Skip to content

Commit

Permalink
Merge pull request #3 from thiagodnf/dev
Browse files Browse the repository at this point in the history
added method to clear all changes in the nodes and edges
  • Loading branch information
thiagodnf authored May 18, 2020
2 parents 958ffd4 + 04856ed commit 7566351
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/group-sequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,16 @@ class GroupSequence {
edges: processedEdges
};
}

static clear (graph) {

graph.nodes.forEach( (node) => {
delete node.x;
delete node.y;
});

graph.edges.forEach( (edge) => {
delete edge.smooth;
});
}
}

0 comments on commit 7566351

Please sign in to comment.