@@ -204,6 +204,11 @@ export class BlockDragger implements IBlockDragger {
204204 this . updateConnectionPreview ( block , delta ) ;
205205 }
206206
207+ /**
208+ * @param draggingBlock The block being dragged.
209+ * @param dragDelta How far the pointer has moved from the position
210+ * at the start of the drag, in pixel units.
211+ */
207212 private moveBlock ( draggingBlock : BlockSvg , dragDelta : Coordinate ) {
208213 const delta = this . pixelsToWorkspaceUnits_ ( dragDelta ) ;
209214 const newLoc = Coordinate . sum ( this . startXY_ , delta ) ;
@@ -223,6 +228,11 @@ export class BlockDragger implements IBlockDragger {
223228 /**
224229 * Returns true if we would delete the block if it was dropped at this time,
225230 * false otherwise.
231+ *
232+ * @param e The most recent move event.
233+ * @param draggingBlock The block being dragged.
234+ * @param delta How far the pointer has moved from the position
235+ * at the start of the drag, in pixel units.
226236 */
227237 private wouldDeleteBlock (
228238 e : PointerEvent ,
@@ -245,7 +255,16 @@ export class BlockDragger implements IBlockDragger {
245255 ) ;
246256 }
247257
248- private updateConnectionPreview ( draggingBlock : BlockSvg , delta : Coordinate ) {
258+ /**
259+ * @param draggingBlock The block being dragged.
260+ * @param dragDelta How far the pointer has moved from the position
261+ * at the start of the drag, in pixel units.
262+ */
263+ private updateConnectionPreview (
264+ draggingBlock : BlockSvg ,
265+ dragDelta : Coordinate ,
266+ ) {
267+ const delta = this . pixelsToWorkspaceUnits_ ( dragDelta ) ;
249268 const currCandidate = this . connectionCandidate ;
250269 const newCandidate = this . getConnectionCandidate ( draggingBlock , delta ) ;
251270 if ( ! newCandidate ) {
@@ -333,7 +352,9 @@ export class BlockDragger implements IBlockDragger {
333352 delta : Coordinate ,
334353 ) : ConnectionCandidate | null {
335354 const localConns = this . getLocalConnections ( draggingBlock ) ;
336- let radius = config . snapRadius ;
355+ let radius = this . connectionCandidate
356+ ? config . connectingSnapRadius
357+ : config . snapRadius ;
337358 let candidate = null ;
338359
339360 for ( const conn of localConns ) {
0 commit comments