refactor: Rename Blockly.connectionTypes to Blockly.ConnectionType (#5407)

* Renamed Blockly.connectionTypes to Blockly.ConnectionType
* Renamed core/connection_types.js to connection_type.js
* Add entry to renamings.js for renaming of Blockly.connectionTypes

Co-authored-by: Christopher Allen <cpcallen+git@google.com>
This commit is contained in:
Himanshu
2021-09-24 17:15:10 +05:30
committed by GitHub
parent de330c8874
commit 3629ed5f65
22 changed files with 137 additions and 131 deletions

View File

@@ -13,6 +13,7 @@
goog.module('Blockly.InsertionMarkerManager');
const ComponentManager = goog.require('Blockly.ComponentManager');
const ConnectionType = goog.require('Blockly.ConnectionType');
/* eslint-disable-next-line no-unused-vars */
const Coordinate = goog.requireType('Blockly.utils.Coordinate');
const Events = goog.require('Blockly.Events');
@@ -26,7 +27,6 @@ const RenderedConnection = goog.requireType('Blockly.RenderedConnection');
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
const blockAnimations = goog.require('Blockly.blockAnimations');
const common = goog.require('Blockly.common');
const connectionTypes = goog.require('Blockly.connectionTypes');
const constants = goog.require('Blockly.constants');
const internalConstants = goog.require('Blockly.internalConstants');
/* eslint-disable-next-line no-unused-vars */
@@ -660,7 +660,7 @@ InsertionMarkerManager.prototype.hideInsertionMarker_ = function() {
const isFirstInStatementStack =
(imConn == markerNext && !(markerPrev && markerPrev.targetConnection));
const isFirstInOutputStack = imConn.type == connectionTypes.INPUT_VALUE &&
const isFirstInOutputStack = imConn.type == ConnectionType.INPUT_VALUE &&
!(markerOutput && markerOutput.targetConnection);
// The insertion marker is the first block in a stack. Unplug won't do
// anything in that case. Instead, unplug the following block.
@@ -669,7 +669,7 @@ InsertionMarkerManager.prototype.hideInsertionMarker_ = function() {
}
// Inside of a C-block, first statement connection.
else if (
imConn.type == connectionTypes.NEXT_STATEMENT && imConn != markerNext) {
imConn.type == ConnectionType.NEXT_STATEMENT && imConn != markerNext) {
const innerConnection = imConn.targetConnection;
innerConnection.getSourceBlock().unplug(false);