This commit is contained in:
Neil Fraser
2019-08-01 16:39:29 -07:00
committed by Neil Fraser
parent ae24b544f3
commit 939bbd072b
7 changed files with 12 additions and 13 deletions

View File

@@ -132,7 +132,7 @@ Blockly.ASTNode.createFieldNode = function(field) {
* @return {Blockly.ASTNode} An AST node pointing to a connection.
*/
Blockly.ASTNode.createConnectionNode = function(connection) {
if (!connection){
if (!connection) {
return null;
}
if (connection.type === Blockly.INPUT_VALUE) {
@@ -209,7 +209,7 @@ Blockly.ASTNode.createWorkspaceNode = function(workspace, wsCoordinate) {
* @param {Object} params The user specified parameters.
* @private
*/
Blockly.ASTNode.prototype.processParams_ = function(params){
Blockly.ASTNode.prototype.processParams_ = function(params) {
if (!params) {
return;
}
@@ -608,8 +608,8 @@ Blockly.ASTNode.prototype.in = function() {
return Blockly.ASTNode.createConnectionNode(targetConnection);
}
break;
}
return null;
};
@@ -682,9 +682,8 @@ Blockly.ASTNode.prototype.out = function() {
var target = this.location_.targetConnection;
if (target) {
return Blockly.ASTNode.createConnectionNode(target);
} else {
return Blockly.ASTNode.createStackNode(this.location_.getSourceBlock());
}
return Blockly.ASTNode.createStackNode(this.location_.getSourceBlock());
case Blockly.ASTNode.types.FIELD:
return Blockly.ASTNode.createBlockNode(this.location_.getSourceBlock());

View File

@@ -331,7 +331,7 @@ Blockly.blockRendering.RenderInfo.prototype.getInRowSpacing_ = function(prev, ne
if (prev.isIcon()) {
return (Blockly.blockRendering.constants.LARGE_PADDING * 2) + 1;
}
if (prev.isHat()){
if (prev.isHat()) {
return Blockly.blockRendering.constants.NO_PADDING;
}
// Establish a minimum width for a block with a previous or next connection.
@@ -412,7 +412,7 @@ Blockly.blockRendering.RenderInfo.prototype.getInRowSpacing_ = function(prev, ne
}
// Spacing between a rounded corner and a previous or next connection
if (prev.isRoundedCorner()){
if (prev.isRoundedCorner()) {
if (next.isPreviousConnection()) {
return Blockly.blockRendering.constants.NOTCH_OFFSET_ROUNDED_CORNER_PREV;
} else if (next.isNextConnection()) {

View File

@@ -253,8 +253,8 @@ BlockExporterController.prototype.selectUsedBlocks = function() {
}
this.view.listSelectedBlocks();
if (unstoredCustomBlockTypes.length > 0){
// Warn user to import block defifnitions and generator code for blocks
if (unstoredCustomBlockTypes.length > 0) {
// Warn user to import block definitions and generator code for blocks
// not in their Block Library nor Blockly's standard library.
var blockTypesText = unstoredCustomBlockTypes.join(', ');
var customWarning = 'Custom blocks used in workspace factory but not ' +

View File

@@ -335,7 +335,7 @@ button, .buttonStyle {
padding: 5px 19px;
}
.tab:hover:not(.tabon){
.tab:hover:not(.tabon) {
background-color: #e8e8e8;
}

View File

@@ -103,7 +103,7 @@ Blockly.JavaScript.ORDER_LOGICAL_AND = 13; // &&
Blockly.JavaScript.ORDER_LOGICAL_OR = 14; // ||
Blockly.JavaScript.ORDER_CONDITIONAL = 15; // ?:
Blockly.JavaScript.ORDER_ASSIGNMENT = 16; // = += -= **= *= /= %= <<= >>= ...
Blockly.JavaScript.ORDER_YIELD = 17; // yield
Blockly.JavaScript.ORDER_YIELD = 17; // yield
Blockly.JavaScript.ORDER_COMMA = 18; // ,
Blockly.JavaScript.ORDER_NONE = 99; // (...)

View File

@@ -430,7 +430,7 @@ Blockly.PHP['lists_getSublist'] = function(block) {
' $at1 = count($list) - 1 - $at1;',
' } else if ($where1 == \'FIRST\') {',
' $at1 = 0;',
' } else if ($where1 != \'FROM_START\'){',
' } else if ($where1 != \'FROM_START\') {',
' throw new Exception(\'Unhandled option (lists_get_sublist).\');',
' }',
' $length = 0;',

View File

@@ -174,7 +174,7 @@ Blockly.PHP['text_getSubstring'] = function(block) {
' $at1 = strlen($text) - 1 - $at1;',
' } else if ($where1 == \'FIRST\') {',
' $at1 = 0;',
' } else if ($where1 != \'FROM_START\'){',
' } else if ($where1 != \'FROM_START\') {',
' throw new Exception(\'Unhandled option (text_get_substring).\');',
' }',
' $length = 0;',