Skip to content

Commit 4371d28

Browse files
authored
feat: Allow selection of next-statement connections in line cursor (#54)
This allows insertion of new blocks into a stack.
1 parent fe2727d commit 4371d28

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/line_cursor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export class LineCursor extends Marker {
4343
}
4444
let newNode = this.getNextNode(curNode, this.validLineNode);
4545

46-
// Skip the input or next value if there is a connected block.
46+
// Skip the input (but not next) connection if there is a connected block.
4747
if (
4848
newNode &&
49-
(newNode.getType() == ASTNode.types.INPUT ||
50-
newNode.getType() == ASTNode.types.NEXT) &&
49+
newNode.getType() === ASTNode.types.INPUT &&
5150
(newNode.getLocation() as Blockly.Connection).targetBlock()
5251
) {
5352
newNode = this.getNextNode(newNode, this.validLineNode);

0 commit comments

Comments
 (0)