From 7414c59b8935bbd68a3bed8a0c640fbb46e3cc7d Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Sun, 8 Mar 2015 19:17:12 -0700 Subject: [PATCH] Fix headless procedure arguments (issue 268). --- blockly_compressed.js | 6 +++--- core/block.js | 2 +- core/input.js | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 8cf93ad32..9bbf2519d 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -904,7 +904,7 @@ Blockly.Input=function(a,b,c,d){this.type=a;this.name=b;this.sourceBlock_=c;this Blockly.Input.prototype.appendField=function(a,b){if(!a&&!b)return this;goog.isString(a)&&(a=new Blockly.FieldLabel(a));this.sourceBlock_.rendered&&a.init(this.sourceBlock_);a.name=b;a.prefixField&&this.appendField(a.prefixField);this.fieldRow.push(a);a.suffixField&&this.appendField(a.suffixField);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_());return this}; Blockly.Input.prototype.appendTitle=function(a,b){console.log("Deprecated call to appendTitle, use appendField instead.");return this.appendField(a,b)};Blockly.Input.prototype.removeField=function(a){for(var b=0,c;c=this.fieldRow[b];b++)if(c.name===a){c.dispose();this.fieldRow.splice(b,1);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_());return}goog.asserts.fail('Field "%s" not found.',a)};Blockly.Input.prototype.isVisible=function(){return this.visible_}; Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)return b;for(var c=(this.visible_=a)?"block":"none",d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);this.connection&&(a?b=this.connection.unhideAll():this.connection.hideAll(),d=this.connection.targetBlock())&&(d.getSvgRoot().style.display=c,a||(d.rendered=!1));return b};Blockly.Input.prototype.setCheck=function(a){if(!this.connection)throw"This input does not have a connection.";this.connection.setCheck(a);return this}; -Blockly.Input.prototype.setAlign=function(a){this.align=a;this.sourceBlock_.rendered&&this.sourceBlock_.render();return this};Blockly.Input.prototype.init=function(){for(var a=0;a