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 @@ -140,6 +140,7 @@ export class Mover {
140140 this . moves . set ( workspace , info ) ;
141141 // Begin drag.
142142 dragger . onDragStart ( info . fakePointerEvent ( 'pointerdown' ) ) ;
143+ info . updateTotalDelta ( ) ;
143144 return true ;
144145 }
145146
Original file line number Diff line number Diff line change @@ -68,12 +68,14 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
6868 // The next constrained move will resume the search from the current
6969 // candidate location.
7070 this . searchNode = ASTNode . createConnectionNode ( neighbour ) ;
71- // The moving block will be positioned slightly down and to the
72- // right of the connection it found.
73- // @ts -expect-error block is private.
74- this . block . moveDuringDrag (
75- new utils . Coordinate ( neighbour . x + 10 , neighbour . y + 10 ) ,
76- ) ;
71+ if ( this . isConstrainedMovement ( ) ) {
72+ // Position the moving block down and slightly to the right of the
73+ // target connection.
74+ // @ts -expect-error block is private.
75+ this . block . moveDuringDrag (
76+ new utils . Coordinate ( neighbour . x + 10 , neighbour . y + 10 ) ,
77+ ) ;
78+ }
7779 } else {
7880 // Handle the case when unconstrained drag was far from any candidate.
7981 this . searchNode = null ;
You can’t perform that action at this time.
0 commit comments