MCPcopy Index your code
hub / github.com/codecombat/codecombat / findLastBlockWithNextConnection

Function findLastBlockWithNextConnection

app/core/blocklyUtils.js:1417–1426  ·  view source on GitHub ↗
(block)

Source from the content-addressed store, hash-verified

1415}
1416
1417function findLastBlockWithNextConnection (block) {
1418 let lastBlockWithNextConnection
1419 if (block.nextConnection) {
1420 lastBlockWithNextConnection = block
1421 }
1422 for (const child of block.getChildren(true)) {
1423 lastBlockWithNextConnection = findLastBlockWithNextConnection(child) || lastBlockWithNextConnection
1424 }
1425 return lastBlockWithNextConnection
1426}
1427
1428module.exports.createBlockById = function ({ workspace, id, codeLanguage }) {
1429 const flyoutBlock = workspace.getToolbox()?.getFlyout()?.getWorkspace()?.getBlockById(id)

Callers 1

blocklyUtils.jsFile · 0.85

Calls 1

getChildrenMethod · 0.45

Tested by

no test coverage detected