Migrate core/interfaces/i_positionable.js named requires

This commit is contained in:
kozbial
2021-07-16 14:41:40 -07:00
committed by Monica Kozbial
parent 11b47aab25
commit 282cd26ede

View File

@@ -14,23 +14,22 @@
goog.module('Blockly.IPositionable');
goog.module.declareLegacyNamespace();
goog.require('Blockly.IComponent');
goog.requireType('Blockly.MetricsManager');
goog.requireType('Blockly.utils.Rect');
const IComponent = goog.require('Blockly.IComponent');
const Rect = goog.requireType('Blockly.utils.Rect');
const {UiMetrics} = goog.requireType('Blockly.MetricsManager');
/**
* Interface for a component that is positioned on top of the workspace.
* @extends {Blockly.IComponent}
* @extends {IComponent}
* @interface
*/
const IPositionable = function() {};
/**
* Positions the element. Called when the window is resized.
* @param {!Blockly.MetricsManager.UiMetrics} metrics The workspace metrics.
* @param {!Array<!Blockly.utils.Rect>} savedPositions List of rectangles that
* @param {!UiMetrics} metrics The workspace metrics.
* @param {!Array<!Rect>} savedPositions List of rectangles that
* are already on the workspace.
*/
IPositionable.prototype.position;
@@ -38,7 +37,7 @@ IPositionable.prototype.position;
/**
* Returns the bounding rectangle of the UI element in pixel units relative to
* the Blockly injection div.
* @return {?Blockly.utils.Rect} The UI elementss bounding box. Null if
* @return {?Rect} The UI elementss bounding box. Null if
* bounding box should be ignored by other UI elements.
*/
IPositionable.prototype.getBoundingRectangle;