mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
clang-formant core/renderers/measurables/connections.js
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user