Skip to content

Commit

Permalink
Fix inconsistent spacings between blocks (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyMakesThings committed Jan 21, 2024
1 parent dd59330 commit fc97dd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/data_category.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Blockly.DataCategory = function(workspace) {
}

if (variableModelList.length > 0) {
xmlList[xmlList.length - 1].setAttribute('gap', 24);
xmlList[xmlList.length - 1].setAttribute('gap', 28);
var firstVariable = variableModelList[0];

Blockly.DataCategory.addSetVariableTo(xmlList, firstVariable);
Expand All @@ -70,7 +70,7 @@ Blockly.DataCategory = function(workspace) {
}

if (variableModelList.length > 0) {
xmlList[xmlList.length - 1].setAttribute('gap', 24);
xmlList[xmlList.length - 1].setAttribute('gap', 28);
var firstVariable = variableModelList[0];

Blockly.DataCategory.addAddToList(xmlList, firstVariable);
Expand Down Expand Up @@ -430,7 +430,7 @@ Blockly.DataCategory.addBlock = function(xmlList, variable, blockType,
opt_secondValue[1], opt_secondValue[2]);
}

var gap = 8;
var gap = 10;
var blockText = '<xml>' +
'<block type="' + blockType + '" gap="' + gap + '">' +
Blockly.Variables.generateVariableFieldXml_(variable, fieldName) +
Expand Down
4 changes: 2 additions & 2 deletions core/procedures.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Blockly.Procedures.flyoutCategory = function(workspace) {
// </block>
var block = goog.dom.createDom('block');
block.setAttribute('type', 'procedures_call');
block.setAttribute('gap', 16);
block.setAttribute('gap', 12);
block.appendChild(mutation);
xmlList.push(block);
}
Expand All @@ -251,7 +251,7 @@ Blockly.Procedures.flyoutCategory = function(workspace) {
if (showReturn) {
var returnBlock = goog.dom.createDom('block');
returnBlock.setAttribute('type', Blockly.PROCEDURES_RETURN_BLOCK_TYPE);
returnBlock.setAttribute('gap', 16);
returnBlock.setAttribute('gap', 12);
var returnBlockValue = goog.dom.createDom('value');
returnBlockValue.setAttribute('name', 'VALUE');
var returnBlockShadow = goog.dom.createDom('shadow');
Expand Down

0 comments on commit fc97dd1

Please sign in to comment.