fix: export Blockly.Names.NameType and Blockly.Input.Align correctly (#6030)

* fix: make NameType available externally

* fix: export Input.Align
This commit is contained in:
Maribeth Bottorff
2022-03-24 15:05:38 -07:00
committed by GitHub
parent 364bf14ce6
commit 2c15d002ab
2 changed files with 19 additions and 12 deletions

View File

@@ -31,18 +31,6 @@ const {inputTypes} = goog.require('Blockly.inputTypes');
goog.require('Blockly.FieldLabel');
/**
* Enum for alignment of inputs.
* @enum {number}
* @alias Blockly.Input.Align
*/
const Align = {
LEFT: -1,
CENTRE: 0,
RIGHT: 1,
};
exports.Align = Align;
/**
* Class for an input with an optional field.
* @alias Blockly.Input
@@ -329,4 +317,19 @@ class Input {
}
}
/**
* Enum for alignment of inputs.
* @enum {number}
* @alias Blockly.Input.Align
*/
const Align = {
LEFT: -1,
CENTRE: 0,
RIGHT: 1,
};
exports.Align = Align;
// Add Align to Input so that `Blockly.Input.Align` is publicly accessible.
Input.Align = Align;
exports.Input = Input;

View File

@@ -277,6 +277,10 @@ const NameType = {
};
exports.NameType = NameType;
// We have to export NameType here so that it is accessible under the old name
// `Blockly.Names.NameType`
Names.NameType = NameType;
/**
* Constant to separate developer variable names from user-defined variable
* names when running generators.