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
Notice that the block offsets slightly down and to the right
Press ctrl + Right Arrow to do an unconstrained move to the right.
Notice that the block position has not changed
Press ctrl + Right Arrow again
Notice that the block has now moved to be disconnected
This issue happens inconsistently: when moving the block from its initial location, it always happens. When moving the block from a different preview location, the issue occurs when moving to the left but not the right.
Analysis
There are several issues here. One is that moveUnconstrained does not call info.updateTotalDelta after calling onDrag, so the block's position and its record of total drag movement can get out of sync.
But if we fixed that by just calling info.updateTotalDelta, the block would be unable to move, because after every keypress it would snap back to its location slightly down and to the right of the candidate connection.
Another fix is to increase UNCONSTRAINED_MOVE_DISTANCE. This would mask but not resolve the problem.
To actually fix this, the keyboard dragger and/or mover code needs to check if it's an unconstrained move away from a candidate connection, move an appropriate distance to avoid the connection, and update the total delta appropriately.
The text was updated successfully, but these errors were encountered:
Repro steps
m
to enter movement modectrl + Right Arrow
to do an unconstrained move to the right.ctrl + Right Arrow
againThis issue happens inconsistently: when moving the block from its initial location, it always happens. When moving the block from a different preview location, the issue occurs when moving to the left but not the right.
Analysis
There are several issues here. One is that
moveUnconstrained
does not callinfo.updateTotalDelta
after callingonDrag
, so the block's position and its record of total drag movement can get out of sync.But if we fixed that by just calling
info.updateTotalDelta
, the block would be unable to move, because after every keypress it would snap back to its location slightly down and to the right of the candidate connection.Another fix is to increase
UNCONSTRAINED_MOVE_DISTANCE
. This would mask but not resolve the problem.To actually fix this, the keyboard dragger and/or mover code needs to check if it's an unconstrained move away from a candidate connection, move an appropriate distance to avoid the connection, and update the total delta appropriately.
The text was updated successfully, but these errors were encountered: