You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Had staticGraphWithDragAndDrop set to true
Moved node back and forth a few times, then eventually under some weird dragging condition it does not trigger.
Expected behavior
Always trigger when node position changed
As I was shuffling my way through the code, I noticed this part that the deltas somehow can be 0
To verify things were changing and moving, I console logged "draggedNode" during "_onDragMove" and could definitely confirm the coordinates being updated as it was being dragged.
Logging the drag move coordinates out:
Situation where it does NOT work:
Situation where it does work:
From repeating multiple times, the one observation I see is that when it doesn't work is that the last 3 coordinates during a drag move are the same.
Whereas when it does work it is just the last two coordinates that are the same, and does work.
Is there an underlying purpose on checking this delta, or could we safely remove that validation?
The text was updated successfully, but these errors were encountered:
Looking into it now, I really don't see a problem to remove the delta validation. It will be way more transparent to the client; even if the coordinates don't change it is still cleaner to execute the callback onNodePositionChange 🙂 Feel free to submit a PR
Describe the bug
As title
To Reproduce
Had staticGraphWithDragAndDrop set to true
Moved node back and forth a few times, then eventually under some weird dragging condition it does not trigger.
Expected behavior
Always trigger when node position changed
Environment:
"dependencies": {
"d3": "^5.12.0",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-contexify": "^4.1.1",
"react-d3-graph": "^2.3.0",
"react-dom": "^16.6.3",
"react-select": "^3.0.8",
"semantic-ui-react": "^0.88.1"
},
As I was shuffling my way through the code, I noticed this part that the deltas somehow can be 0
To verify things were changing and moving, I console logged "draggedNode" during "_onDragMove" and could definitely confirm the coordinates being updated as it was being dragged.
Logging the drag move coordinates out:
Situation where it does NOT work:
Situation where it does work:
From repeating multiple times, the one observation I see is that when it doesn't work is that the last 3 coordinates during a drag move are the same.
Whereas when it does work it is just the last two coordinates that are the same, and does work.
Is there an underlying purpose on checking this delta, or could we safely remove that validation?
The text was updated successfully, but these errors were encountered: