mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
Re-allow output coupled with next statement.
This commit is contained in:
@@ -691,8 +691,6 @@ Blockly.Block.prototype.setNextStatement = function(newBoolean, opt_check) {
|
||||
this.nextConnection = null;
|
||||
}
|
||||
if (newBoolean) {
|
||||
goog.asserts.assert(!this.outputConnection,
|
||||
'Remove output connection prior to adding previous connection.');
|
||||
if (opt_check === undefined) {
|
||||
opt_check = null;
|
||||
}
|
||||
@@ -721,8 +719,8 @@ Blockly.Block.prototype.setOutput = function(newBoolean, opt_check) {
|
||||
this.outputConnection = null;
|
||||
}
|
||||
if (newBoolean) {
|
||||
goog.asserts.assert(!this.previousConnection && !this.nextConnection,
|
||||
'Remove previous/next connection prior to adding output connection.');
|
||||
goog.asserts.assert(!this.previousConnection,
|
||||
'Remove previous connection prior to adding output connection.');
|
||||
if (opt_check === undefined) {
|
||||
opt_check = null;
|
||||
}
|
||||
@@ -889,9 +887,8 @@ Blockly.Block.prototype.appendDummyInput = function(opt_name) {
|
||||
Blockly.Block.prototype.jsonInit = function(json) {
|
||||
// Validate inputs.
|
||||
goog.asserts.assert(json['output'] == undefined ||
|
||||
(json['previousStatement'] == undefined &&
|
||||
json['nextStatement'] == undefined),
|
||||
'Must not have both an output and a previous/nextStatement.');
|
||||
json['previousStatement'] == undefined,
|
||||
'Must not have both an output and a previousStatement.');
|
||||
|
||||
// Set basic properties of block.
|
||||
this.setColour(json['colour']);
|
||||
|
||||
Reference in New Issue
Block a user