diff --git a/core/block.js b/core/block.js index 955b01c72d..c799d023f5 100644 --- a/core/block.js +++ b/core/block.js @@ -1499,6 +1499,9 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) { if (field) { fieldStack.push([field, element['name']]); } else if (input) { + if (element['shape']) { + input.setShape(element['shape']); + } if (element['check']) { input.setCheck(element['check']); } diff --git a/core/input.js b/core/input.js index 91bb4f12bf..6c23e30d86 100644 --- a/core/input.js +++ b/core/input.js @@ -218,6 +218,14 @@ Blockly.Input.prototype.setCheck = function(check) { return this; }; +Blockly.Input.prototype.setShape = function(shape) { + if (!this.connection) { + throw 'This input does not have a connection.'; + } + this.connection.setShape(shape); + return this; +}; + /** * Change the alignment of the connection's field(s). * @param {number} align One of Blockly.ALIGN_LEFT, ALIGN_CENTRE, ALIGN_RIGHT.