Skip to content

Commit

Permalink
Update javascript.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fustyles authored Dec 30, 2024
1 parent 8d3c8d1 commit 7474a87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions googlemap_20241226/blockly/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ Blockly.JavaScript['googlemap_initial'] = function (block) {
return code;
};

Blockly.JavaScript['googlemap_loaded'] = function (block) {
var statement = Blockly.JavaScript.statementToCode(block, 'statement');
var code = 'async function loadedMap() {\n'+statement+'\n}\n'+
'window.loadedMap = loadedMap;\n';
return code;
};

Blockly.JavaScript['googlemap_addmap'] = function (block) {
var type = block.getFieldValue('type');
var latitude = Blockly.JavaScript.valueToCode(block, 'latitude', Blockly.JavaScript.ORDER_ATOMIC)||"";
Expand Down

0 comments on commit 7474a87

Please sign in to comment.