fix dragging/creating blocks

This commit is contained in:
Silver Kuusik 2017-10-13 14:16:28 +02:00
parent d57afa65d5
commit c8c40b8e6f
1 changed files with 2 additions and 0 deletions

View File

@ -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);