Files
blockly/core/renderers/measurables/previous_connection.js
Aaron Dodson 6b07ccab96 chore: Remove declareLegacyNamespace from renderers (#5528)
* chore: Remove declareLegacyNamespace from Geras renderer

* chore: Remove declareLegacyNamespace from minimalist renderer

* chore: Remove declareLegacyNamespace from thrasos renderer

* chore: Remove declareLegacyNamespace from zelos renderer

* fix: Move debugger functionality out of Blockly.blockRendering to avoid dependency cycle when re-exporting submodules

* chore: Remove declareLegacyNamespace from Blockly.blockRendering.*
2021-09-24 08:33:35 -07:00

45 lines
1.4 KiB
JavaScript

/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Class representing the space a previous connection takes up
* during rendering.
* @author fenichel@google.com (Rachel Fenichel)
*/
goog.module('Blockly.blockRendering.PreviousConnection');
const Connection = goog.require('Blockly.blockRendering.Connection');
/* eslint-disable-next-line no-unused-vars */
const ConstantProvider = goog.requireType('Blockly.blockRendering.ConstantProvider');
/* eslint-disable-next-line no-unused-vars */
const RenderedConnection = goog.requireType('Blockly.RenderedConnection');
const Types = goog.require('Blockly.blockRendering.Types');
const object = goog.require('Blockly.utils.object');
/**
* An object containing information about the space a previous connection takes
* up during rendering.
* @param {!ConstantProvider} constants The rendering
* constants provider.
* @param {RenderedConnection} connectionModel The connection object on
* the block that this represents.
* @package
* @constructor
* @extends {Connection}
*/
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);
exports = PreviousConnection;