clang-formant core/renderers/measurables/connections.js

This commit is contained in:
kozbial
2021-08-16 17:14:36 -07:00
committed by Monica Kozbial
parent 673c64dab8
commit d30b0f5f3c
4 changed files with 11 additions and 19 deletions

View File

@@ -34,14 +34,12 @@ const object = goog.require('Blockly.utils.object');
* @extends {Measurable}
*/
const Connection = function(constants, connectionModel) {
Connection.superClass_.constructor.call(this,
constants);
Connection.superClass_.constructor.call(this, constants);
this.connectionModel = connectionModel;
this.shape = this.constants_.shapeFor(connectionModel);
this.isDynamicShape = !!this.shape['isDynamic'];
this.type |= Types.CONNECTION;
};
object.inherits(Connection,
Measurable);
object.inherits(Connection, Measurable);
exports = Connection;

View File

@@ -34,13 +34,11 @@ const object = goog.require('Blockly.utils.object');
* @extends {Connection}
*/
const NextConnection = function(constants, connectionModel) {
NextConnection.superClass_.constructor.call(this,
constants, connectionModel);
NextConnection.superClass_.constructor.call(this, constants, connectionModel);
this.type |= Types.NEXT_CONNECTION;
this.height = this.shape.height;
this.width = this.shape.width;
};
object.inherits(NextConnection,
Connection);
object.inherits(NextConnection, Connection);
exports = NextConnection;

View File

@@ -35,8 +35,8 @@ const object = goog.require('Blockly.utils.object');
* @extends {Connection}
*/
const OutputConnection = function(constants, connectionModel) {
OutputConnection.superClass_.constructor.call(this,
constants, connectionModel);
OutputConnection.superClass_.constructor.call(
this, constants, connectionModel);
this.type |= Types.OUTPUT_CONNECTION;
this.height = !this.isDynamicShape ? this.shape.height : 0;
@@ -46,7 +46,6 @@ const OutputConnection = function(constants, connectionModel) {
this.connectionOffsetY = this.constants_.TAB_OFFSET_FROM_TOP;
this.connectionOffsetX = 0;
};
object.inherits(OutputConnection,
Connection);
object.inherits(OutputConnection, Connection);
exports = OutputConnection;

View File

@@ -33,16 +33,13 @@ const object = goog.require('Blockly.utils.object');
* @constructor
* @extends {Connection}
*/
const PreviousConnection = function(
constants, connectionModel) {
PreviousConnection.superClass_.constructor.call(this,
constants, connectionModel);
const PreviousConnection = function(constants, connectionModel) {
PreviousConnection.superClass_.constructor.call(
this, constants, connectionModel);
this.type |= Types.PREVIOUS_CONNECTION;
this.height = this.shape.height;
this.width = this.shape.width;
};
object.inherits(PreviousConnection,
Connection);
object.inherits(PreviousConnection, Connection);
exports = PreviousConnection;