fix control_if mutator closing on touch screen

This commit is contained in:
Silver Kuusik 2018-01-15 20:37:09 +01:00
parent 8a9423ae83
commit dae8f457e1
1 changed files with 7 additions and 1 deletions

View File

@ -280,8 +280,14 @@ window.onload = function() {
/* resume the blocks */
Blockly.Xml.domToWorkspace(xml, workspace);
/* disable right click on Blockly workspace */
/* when mouse click occures on Blockly workspace */
Blockly.utils.isRightButton = function(e) {
/* if control_if block is used */
if (controlBlockId != "") {
/* close the control_if block mutator */
workspace.getBlockById(controlBlockId).mutator.setVisible(false);
}
/* disable right click on Blockly workspace */
return false;
};