Skip to content

Commit

Permalink
Move return block to the start of the list instead of the end
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Aug 8, 2023
1 parent 98462bf commit c097023
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/procedures.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,6 @@ Blockly.Procedures.flyoutCategory = function(workspace) {
workspace.procedureReturnsEnabled
);
if (showReturn) {
var returnDocsButton = goog.dom.createDom('button');
returnDocsButton.setAttribute('callbackkey', 'OPEN_RETURN_DOCS');
returnDocsButton.setAttribute('text', Blockly.Msg.PROCEDURES_DOCS);
xmlList.push(returnDocsButton);

var returnBlock = goog.dom.createDom('block');
returnBlock.setAttribute('type', Blockly.PROCEDURES_RETURN_BLOCK_TYPE);
returnBlock.setAttribute('gap', 16);
Expand All @@ -266,7 +261,12 @@ Blockly.Procedures.flyoutCategory = function(workspace) {
returnBlockShadow.appendChild(returnBlockField);
returnBlockValue.appendChild(returnBlockShadow);
returnBlock.appendChild(returnBlockValue);
xmlList.push(returnBlock);
xmlList.unshift(returnBlock);

var returnDocsButton = goog.dom.createDom('button');
returnDocsButton.setAttribute('callbackkey', 'OPEN_RETURN_DOCS');
returnDocsButton.setAttribute('text', Blockly.Msg.PROCEDURES_DOCS);
xmlList.unshift(returnDocsButton);
}

return xmlList;
Expand Down

0 comments on commit c097023

Please sign in to comment.