mark properties @protected instead of @private so they can be used by Blockly.RenderedConnection

This commit is contained in:
Johnny Yang
2018-04-16 01:34:52 +10:00
parent 6c2d63300d
commit 419fe9e8a5

View File

@@ -41,7 +41,7 @@ goog.require('goog.dom');
Blockly.Connection = function(source, type) {
/**
* @type {!Blockly.Block}
* @private
* @protected
*/
this.sourceBlock_ = source;
/** @type {number} */
@@ -89,28 +89,28 @@ Blockly.Connection.prototype.shadowDom_ = null;
/**
* Horizontal location of this connection.
* @type {number}
* @private
* @protected
*/
Blockly.Connection.prototype.x_ = 0;
/**
* Vertical location of this connection.
* @type {number}
* @private
* @protected
*/
Blockly.Connection.prototype.y_ = 0;
/**
* Has this connection been added to the connection database?
* @type {boolean}
* @private
* @protected
*/
Blockly.Connection.prototype.inDB_ = false;
/**
* Connection database for connections of this type on the current workspace.
* @type {Blockly.ConnectionDB}
* @private
* @protected
*/
Blockly.Connection.prototype.db_ = null;
@@ -118,14 +118,14 @@ Blockly.Connection.prototype.db_ = null;
* Connection database for connections compatible with this type on the
* current workspace.
* @type {Blockly.ConnectionDB}
* @private
* @protected
*/
Blockly.Connection.prototype.dbOpposite_ = null;
/**
* Whether this connections is hidden (not tracked in a database) or not.
* @type {boolean}
* @private
* @protected
*/
Blockly.Connection.prototype.hidden_ = null;
@@ -133,7 +133,7 @@ Blockly.Connection.prototype.hidden_ = null;
* Connect two connections together. This is the connection on the superior
* block.
* @param {!Blockly.Connection} childConnection Connection on inferior block.
* @private
* @protected
*/
Blockly.Connection.prototype.connect_ = function(childConnection) {
var parentConnection = this;
@@ -498,7 +498,7 @@ Blockly.Connection.prototype.disconnect = function() {
* Disconnect two blocks that are connected by this connection.
* @param {!Blockly.Block} parentBlock The superior block.
* @param {!Blockly.Block} childBlock The inferior block.
* @private
* @protected
*/
Blockly.Connection.prototype.disconnectInternal_ = function(parentBlock,
childBlock) {
@@ -518,7 +518,7 @@ Blockly.Connection.prototype.disconnectInternal_ = function(parentBlock,
/**
* Respawn the shadow block if there was one connected to the this connection.
* @private
* @protected
*/
Blockly.Connection.prototype.respawnShadow_ = function() {
var parentBlock = this.getSourceBlock();
@@ -552,7 +552,7 @@ Blockly.Connection.prototype.targetBlock = function() {
* value type system. E.g. square_root("Hello") is not compatible.
* @param {!Blockly.Connection} otherConnection Connection to compare against.
* @return {boolean} True if the connections share a type.
* @private
* @protected
*/
Blockly.Connection.prototype.checkType_ = function(otherConnection) {
if (!this.check_ || !otherConnection.check_) {