Skip to content

Commit

Permalink
Add BlockType.INLINE
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyMakesThings authored Jan 24, 2024
1 parent 85533a0 commit 7b10180
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engine/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,11 @@ class Runtime extends EventEmitter {
blockJSON.nextStatement = null; // null = available connection; undefined = terminal
}
break;
case BlockType.INLINE:
blockInfo.branchCount = blockInfo.branchCount || 1;
blockJSON.output = blockInfo.allowDropAnywhere ? null : 'String'; // TODO: distinguish number & string here?
blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_SQUARE;
break;
}

const blockText = Array.isArray(blockInfo.text) ? blockInfo.text : [blockInfo.text];
Expand Down

0 comments on commit 7b10180

Please sign in to comment.