mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Use the empty field placeholder for dropdowns that do not have a value selected.
This commit is contained in:
@@ -922,7 +922,11 @@ Blockly.Block.prototype.toString = function(opt_maxLength, opt_emptyToken) {
|
||||
} else {
|
||||
for (var i = 0, input; input = this.inputList[i]; i++) {
|
||||
for (var j = 0, field; field = input.fieldRow[j]; j++) {
|
||||
text.push(field.getText());
|
||||
if (field instanceof Blockly.FieldDropdown && !field.getValue()) {
|
||||
text.push(emptyFieldPlaceholder);
|
||||
} else {
|
||||
text.push(field.getText());
|
||||
}
|
||||
}
|
||||
if (input.connection) {
|
||||
var child = input.connection.targetBlock();
|
||||
|
||||
Reference in New Issue
Block a user