mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
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:
committed by
GitHub
parent
364bf14ce6
commit
2c15d002ab
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user