From c8c40b8e6f13fb47594a528c1cafa821b3e965cf Mon Sep 17 00:00:00 2001 From: Silver Kuusik Date: Fri, 13 Oct 2017 14:16:28 +0200 Subject: [PATCH] fix dragging/creating blocks --- sumorobot.js | 2 ++ 1 file changed, 2 insertions(+) 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);