Skip to content

Commit 4f0fb12

Browse files
committed
Support connecting C shaped blocks around detached stacks
1 parent 4f3f5a7 commit 4f0fb12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/keyboard_drag_strategy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ export class KeyboardDragStrategy extends dragging.BlockDragStrategy {
106106
private getConstrainedConnectionCandidate(
107107
draggingBlock: BlockSvg,
108108
): ConnectionCandidate | null {
109-
if (!draggingBlock.previousConnection && !draggingBlock.outputConnection) {
110-
return null;
111-
}
112109
// @ts-expect-error getLocalConnections is private.
113110
const localConns = this.getLocalConnections(draggingBlock);
111+
if (localConns.length == 0) {
112+
return null;
113+
}
114114

115115
let candidateConnection = this.findTraversalCandidate(
116116
draggingBlock,

0 commit comments

Comments
 (0)