mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Merge pull request #1182 from paulkaplan/fix-flyout-var-ids
Re-fix the flyout variable block IDs
This commit is contained in:
commit
e04cf81727
1 changed files with 3 additions and 1 deletions
|
@ -94,10 +94,12 @@ Blockly.DataCategory = function(workspace) {
|
|||
* @param {?Blockly.VariableModel} variable Variable to select in the field.
|
||||
*/
|
||||
Blockly.DataCategory.addDataVariable = function(xmlList, variable) {
|
||||
// <block type="data_variable">
|
||||
// <block id="variableId" type="data_variable">
|
||||
// <field name="VARIABLE">variablename</field>
|
||||
// </block>
|
||||
Blockly.DataCategory.addBlock(xmlList, variable, 'data_variable', 'VARIABLE');
|
||||
// In the flyout, this ID must match variable ID for monitor syncing reasons
|
||||
xmlList[xmlList.length - 1].setAttribute('id', variable.getId());
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue