diff --git a/sumorobot.js b/sumorobot.js index 0745b59..760265b 100755 --- a/sumorobot.js +++ b/sumorobot.js @@ -265,6 +265,8 @@ window.onload = function() { /* on blockly code change */ function onCodeChanged(event) { + /* only process change and move commands */ + if (event.type != Blockly.Events.CHANGE && event.type != Blockly.Events.MOVE) return; /* generate code from the used blocks */ var code = Blockly.Sumorobot.workspaceToCode(workspace);