File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ export class Mover {
121121 this . moves . set ( workspace , info ) ;
122122 // Begin drag.
123123 dragger . onDragStart ( info . fakePointerEvent ( 'pointerdown' ) ) ;
124+ info . updateTotalDelta ( ) ;
124125 return true ;
125126 }
126127
Original file line number Diff line number Diff line change @@ -60,12 +60,14 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
6060 // The next constrained move will resume the search from the current
6161 // candidate location.
6262 this . searchNode = ASTNode . createConnectionNode ( neighbour ) ;
63- // The moving block will be positioned slightly down and to the
64- // right of the connection it found.
65- // @ts -expect-error block is private.
66- this . block . moveDuringDrag (
67- new utils . Coordinate ( neighbour . x + 10 , neighbour . y + 10 ) ,
68- ) ;
63+ if ( this . isConstrainedMovement ( ) ) {
64+ // Position the moving block down and slightly to the right of the
65+ // target connection.
66+ // @ts -expect-error block is private.
67+ this . block . moveDuringDrag (
68+ new utils . Coordinate ( neighbour . x + 10 , neighbour . y + 10 ) ,
69+ ) ;
70+ }
6971 } else {
7072 // Handle the case when unconstrained drag was far from any candidate.
7173 this . searchNode = null ;
You can’t perform that action at this time.
0 commit comments