workspaces folders

This commit is contained in:
azykov@mail.ru
2026-06-12 11:46:14 +03:00
parent 88b36988ff
commit 36f76efdd7
102 changed files with 0 additions and 0 deletions
@@ -0,0 +1,24 @@
import * as Blockly from "blockly";
import { javascriptGenerator, Order } from "blockly/javascript";
Blockly.Blocks['console_log_action'] = {
init(this: Blockly.Block) {
this.appendValueInput('VALUE')
.setAlign(Blockly.inputs.Align.RIGHT)
// .setCheck('String')
.appendField('print');
this.setInputsInline(false);
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setTooltip('Print value to console');
this.setHelpUrl('');
this.setColour(150);
}
};
javascriptGenerator.forBlock['console_log_action'] = function (block, generator) {
const valueValue = generator.valueToCode(block, 'VALUE', Order.ATOMIC);
return `console.log(${valueValue});\n`;
};
export { };