mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Revert "Wrap dummy inputs in a measurable so that it can be aligned appropriately. (#3337)"
This reverts commit 7fc733b81f.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user