Revert "Wrap dummy inputs in a measurable so that it can be aligned appropriately. (#3337)"

This reverts commit 7fc733b81f.
This commit is contained in:
Sam El-Husseini
2019-10-24 21:53:30 -07:00
parent a79ea1652a
commit 100da4a66c
3 changed files with 4 additions and 25 deletions

View File

@@ -374,8 +374,8 @@ Blockly.blockRendering.RenderInfo.prototype.addInput_ = function(input, activeRo
new Blockly.blockRendering.ExternalValueInput(this.constants_, input));
activeRow.hasExternalInput = true;
} else if (input.type == Blockly.DUMMY_INPUT) {
activeRow.elements.push(
new Blockly.blockRendering.DummyInput(this.constants_, input));
// Dummy inputs have no visual representation, but the information is still
// important.
activeRow.hasDummyInput = true;
}
};

View File

@@ -113,8 +113,8 @@ Blockly.geras.RenderInfo.prototype.addInput_ = function(input, activeRow) {
new Blockly.blockRendering.ExternalValueInput(this.constants_, input));
activeRow.hasExternalInput = true;
} else if (input.type == Blockly.DUMMY_INPUT) {
activeRow.elements.push(
new Blockly.blockRendering.DummyInput(this.constants_, input));
// Dummy inputs have no visual representation, but the information is still
// important.
activeRow.hasDummyInput = true;
}
};

View File

@@ -70,27 +70,6 @@ Blockly.blockRendering.InputConnection = function(constants, input) {
Blockly.utils.object.inherits(Blockly.blockRendering.InputConnection,
Blockly.blockRendering.Connection);
/**
* An object containing information about the space a dummy input takes up
* during rendering
* @param {!Blockly.blockRendering.ConstantProvider} constants The rendering
* constants provider.
* @param {!Blockly.Input} input The inline input to measure and store
* information for.
* @package
* @constructor
* @extends {Blockly.blockRendering.Measurable}
*/
Blockly.blockRendering.DummyInput = function(constants, input) {
Blockly.blockRendering.DummyInput.superClass_.constructor.call(this,
constants);
this.type |= Blockly.blockRendering.Types.INPUT;
this.input = input;
this.align = input.align;
};
Blockly.utils.object.inherits(Blockly.blockRendering.DummyInput,
Blockly.blockRendering.Measurable);
/**
* An object containing information about the space an inline input takes up
* during rendering