From fc97dd1ebae07b5b44c4be498661cc1e29d554e3 Mon Sep 17 00:00:00 2001 From: LilyMakesThings <127533508+LilyMakesThings@users.noreply.github.com> Date: Sun, 21 Jan 2024 19:53:40 +0000 Subject: [PATCH] Fix inconsistent spacings between blocks (#9) --- core/data_category.js | 6 +++--- core/procedures.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/data_category.js b/core/data_category.js index aa1a0ebd19..2e2f066a87 100644 --- a/core/data_category.js +++ b/core/data_category.js @@ -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); @@ -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); @@ -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 = '' + '' + Blockly.Variables.generateVariableFieldXml_(variable, fieldName) + diff --git a/core/procedures.js b/core/procedures.js index 5bd0735f93..f349ffaef1 100644 --- a/core/procedures.js +++ b/core/procedures.js @@ -238,7 +238,7 @@ Blockly.Procedures.flyoutCategory = function(workspace) { // 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); } @@ -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');