mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Fix headless procedure arguments (issue 268).
This commit is contained in:
@@ -808,7 +808,7 @@ Blockly.Block.prototype.setCollapsed = function(collapsed) {
|
||||
*/
|
||||
Blockly.Block.prototype.toString = function(opt_maxLength) {
|
||||
var text = [];
|
||||
if(this.collapsed_) {
|
||||
if (this.collapsed_) {
|
||||
text.push(this.getInput('_TEMP_COLLAPSED_INPUT').fieldRow[0].text_);
|
||||
} else {
|
||||
for (var i = 0, input; input = this.inputList[i]; i++) {
|
||||
|
||||
@@ -202,6 +202,9 @@ Blockly.Input.prototype.setAlign = function(align) {
|
||||
* Initialize the fields on this input.
|
||||
*/
|
||||
Blockly.Input.prototype.init = function() {
|
||||
if (!this.sourceBlock_.workspace.rendered) {
|
||||
return; // Headless blocks don't need fields initialized.
|
||||
}
|
||||
for (var x = 0; x < this.fieldRow.length; x++) {
|
||||
this.fieldRow[x].init(this.sourceBlock_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user