Skip to content

Commit

Permalink
v1.2.3, copy position in Node.fromJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed Apr 28, 2019
1 parent b0e3451 commit 5ad5ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rete",
"version": "1.2.2",
"version": "1.2.3",
"description": "JavaScript framework",
"main": "build/rete.common.js",
"module": "build/rete.esm.js",
Expand Down
3 changes: 2 additions & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ export class Node {

static fromJSON(json: NodeData) {
const node = new Node(json.name);
const [x, y] = json.position;

node.id = json.id;
node.data = json.data;
node.position = json.position;
node.position = [x, y];
node.name = json.name;
Node.latestId = Math.max(node.id, Node.latestId);

Expand Down

0 comments on commit 5ad5ac8

Please sign in to comment.