mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Fix lint
This commit is contained in:
@@ -139,7 +139,7 @@ Blockly.Connection.prototype.connect_ = function(childConnection) {
|
||||
orphanBlock = null;
|
||||
}
|
||||
} else if (
|
||||
parentConnection.type == Blockly.connectionTypes.NEXT_STATEMENT) {
|
||||
parentConnection.type == Blockly.connectionTypes.NEXT_STATEMENT) {
|
||||
// Statement connections.
|
||||
// Statement blocks may be inserted into the middle of a stack.
|
||||
// Split the stack.
|
||||
|
||||
@@ -546,13 +546,13 @@ Blockly.Events.Move.prototype.run = function(forward) {
|
||||
} else {
|
||||
var blockConnection = block.outputConnection || block.previousConnection;
|
||||
var parentConnection;
|
||||
var connectionType = blockConnection.type;
|
||||
if (inputName) {
|
||||
var input = parentBlock.getInput(inputName);
|
||||
if (input) {
|
||||
parentConnection = input.connection;
|
||||
}
|
||||
} else if (
|
||||
blockConnection.type == Blockly.connectionTypes.PREVIOUS_STATEMENT) {
|
||||
} else if (connectionType == Blockly.connectionTypes.PREVIOUS_STATEMENT) {
|
||||
parentConnection = parentBlock.nextConnection;
|
||||
}
|
||||
if (parentConnection) {
|
||||
|
||||
@@ -628,8 +628,7 @@ Blockly.InsertionMarkerManager.prototype.hideInsertionMarker_ = function() {
|
||||
imConn.targetBlock().unplug(false);
|
||||
}
|
||||
// Inside of a C-block, first statement connection.
|
||||
else if (
|
||||
imConn.type == Blockly.connectionTypes.NEXT_STATEMENT &&
|
||||
else if (imConn.type == Blockly.connectionTypes.NEXT_STATEMENT &&
|
||||
imConn != markerNext) {
|
||||
var innerConnection = imConn.targetConnection;
|
||||
innerConnection.getSourceBlock().unplug(false);
|
||||
|
||||
@@ -145,20 +145,20 @@ Blockly.ASTNode.createFieldNode = function(field) {
|
||||
* @return {Blockly.ASTNode} An AST node pointing to a connection.
|
||||
*/
|
||||
Blockly.ASTNode.createConnectionNode = function(connection) {
|
||||
var type = connection.type;
|
||||
if (!connection) {
|
||||
return null;
|
||||
}
|
||||
if (connection.type == Blockly.connectionTypes.INPUT_VALUE) {
|
||||
if (type == Blockly.connectionTypes.INPUT_VALUE) {
|
||||
return Blockly.ASTNode.createInputNode(connection.getParentInput());
|
||||
} else if (
|
||||
connection.type == Blockly.connectionTypes.NEXT_STATEMENT &&
|
||||
} else if (type == Blockly.connectionTypes.NEXT_STATEMENT &&
|
||||
connection.getParentInput()) {
|
||||
return Blockly.ASTNode.createInputNode(connection.getParentInput());
|
||||
} else if (connection.type == Blockly.connectionTypes.NEXT_STATEMENT) {
|
||||
} else if (type == Blockly.connectionTypes.NEXT_STATEMENT) {
|
||||
return new Blockly.ASTNode(Blockly.ASTNode.types.NEXT, connection);
|
||||
} else if (connection.type == Blockly.connectionTypes.OUTPUT_VALUE) {
|
||||
} else if (type == Blockly.connectionTypes.OUTPUT_VALUE) {
|
||||
return new Blockly.ASTNode(Blockly.ASTNode.types.OUTPUT, connection);
|
||||
} else if (connection.type == Blockly.connectionTypes.PREVIOUS_STATEMENT) {
|
||||
} else if (type == Blockly.connectionTypes.PREVIOUS_STATEMENT) {
|
||||
return new Blockly.ASTNode(Blockly.ASTNode.types.PREVIOUS, connection);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -207,14 +207,14 @@ Blockly.blockRendering.MarkerSvg.prototype.draw = function(oldNode, curNode) {
|
||||
Blockly.blockRendering.MarkerSvg.prototype.showAtLocation_ = function(curNode) {
|
||||
var curNodeAsConnection =
|
||||
/** @type {!Blockly.Connection} */ (curNode.getLocation());
|
||||
var connectionType = curNodeAsConnection.type;
|
||||
if (curNode.getType() == Blockly.ASTNode.types.BLOCK) {
|
||||
this.showWithBlock_(curNode);
|
||||
} else if (curNode.getType() == Blockly.ASTNode.types.OUTPUT) {
|
||||
this.showWithOutput_(curNode);
|
||||
} else if (curNodeAsConnection.type == Blockly.connectionTypes.INPUT_VALUE) {
|
||||
} else if (connectionType == Blockly.connectionTypes.INPUT_VALUE) {
|
||||
this.showWithInput_(curNode);
|
||||
} else if (
|
||||
curNodeAsConnection.type == Blockly.connectionTypes.NEXT_STATEMENT) {
|
||||
} else if (connectionType == Blockly.connectionTypes.NEXT_STATEMENT) {
|
||||
this.showWithNext_(curNode);
|
||||
} else if (curNode.getType() == Blockly.ASTNode.types.PREVIOUS) {
|
||||
this.showWithPrevious_(curNode);
|
||||
|
||||
Reference in New Issue
Block a user