Stop some blocks from throwing errors in headless workspaces.

This commit is contained in:
Neil Fraser
2016-11-18 13:32:31 -08:00
parent 10a8844980
commit 531b6caf5d
2 changed files with 2 additions and 2 deletions

View File

@@ -257,7 +257,7 @@ Blockly.Blocks['controls_flow_statements'] = {
* @this Blockly.Block
*/
onchange: function(e) {
if (this.workspace.isDragging()) {
if (!this.workspace.isDragging || this.workspace.isDragging()) {
return; // Don't change state at the start of a drag.
}
var legal = false;

View File

@@ -843,7 +843,7 @@ Blockly.Blocks['procedures_ifreturn'] = {
* @this Blockly.Block
*/
onchange: function(e) {
if (this.workspace.isDragging()) {
if (!this.workspace.isDragging || this.workspace.isDragging()) {
return; // Don't change state at the start of a drag.
}
var legal = false;