From 6b19176b60e2f4e089148057b5e2f40d6c2c4ac4 Mon Sep 17 00:00:00 2001 From: fustyles <34397289+fustyles@users.noreply.github.com> Date: Mon, 30 Dec 2024 22:56:50 +0800 Subject: [PATCH] Update javascript.js --- googlemap_20241226/blockly/javascript.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/googlemap_20241226/blockly/javascript.js b/googlemap_20241226/blockly/javascript.js index ddbd8cb68b..2e17838674 100644 --- a/googlemap_20241226/blockly/javascript.js +++ b/googlemap_20241226/blockly/javascript.js @@ -123,20 +123,12 @@ Blockly.JavaScript['googlemap_initial'] = function (block) { ' pMapId.setZoom(Number(val));\n'+ '}\n'+ 'function headingMap(pMapId, val) {\n'+ - ' pMapId.setPov(\n'+ - ' {\n'+ - ' heading: Number(val),\n'+ - ' pitch: pMapId.getPov().pitch,\n'+ - ' }\n'+ - ' );\n'+ + ' let pov: { heading: Number(val), pitch: pMapId.getPov().pitch },\n'+ + ' pMapId.setPov(pov);\n'+ '}\n'+ 'function pitchMap(pMapId, val) {\n'+ - ' pMapId.setPov(\n'+ - ' {\n'+ - ' heading: pMapId.getPov().heading,\n'+ - ' pitch: Number(val),\n'+ - ' }\n'+ - ' );\n'+ + ' let pov: { heading: pMapId.getPov().heading, pitch: Number(val) },\n'+ + ' pMapId.setPov(pov);\n'+ '}\n'+ 'function clearMap(pMapId) {\n'+ ' for (var i=0;i