Skip to content

Commit

Permalink
fix/remove delta validation for onNodePositionChange (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav91 authored and danielcaldas committed Nov 16, 2019
1 parent e02b0f4 commit d03ecff
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/graph/Graph.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,9 @@ export default class Graph extends React.Component {
return;
}

const { id, oldX, oldY, x, y } = node;
const deltaX = x - oldX;
const deltaY = y - oldY;
const { id, x, y } = node;

if (deltaX !== 0 || deltaY !== 0) {
this.props.onNodePositionChange(id, x, y);
}
this.props.onNodePositionChange(id, x, y);
};

/**
Expand Down

0 comments on commit d03ecff

Please sign in to comment.