mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Make variable add set/get block in context menu obey block limits
This commit is contained in:
@@ -111,7 +111,7 @@ Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN = {
|
|||||||
var contextMenuMsg = Blockly.Msg.VARIABLES_SET_CREATE_GET;
|
var contextMenuMsg = Blockly.Msg.VARIABLES_SET_CREATE_GET;
|
||||||
}
|
}
|
||||||
|
|
||||||
var option = {enabled: true};
|
var option = {enabled: this.workspace.remainingCapacity() > 0};
|
||||||
var name = this.getFieldValue('VAR');
|
var name = this.getFieldValue('VAR');
|
||||||
option.text = contextMenuMsg.replace('%1', name);
|
option.text = contextMenuMsg.replace('%1', name);
|
||||||
var xmlField = goog.dom.createDom('field', null, name);
|
var xmlField = goog.dom.createDom('field', null, name);
|
||||||
|
|||||||
Reference in New Issue
Block a user