mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Lint
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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 ' +
|
||||
|
||||
@@ -335,7 +335,7 @@ button, .buttonStyle {
|
||||
padding: 5px 19px;
|
||||
}
|
||||
|
||||
.tab:hover:not(.tabon){
|
||||
.tab:hover:not(.tabon) {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;',
|
||||
|
||||
@@ -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;',
|
||||
|
||||
Reference in New Issue
Block a user