From 282cd26edeaeca7c71fe70863f1283f6e5178c9b Mon Sep 17 00:00:00 2001 From: kozbial Date: Fri, 16 Jul 2021 14:41:40 -0700 Subject: [PATCH] Migrate core/interfaces/i_positionable.js named requires --- core/interfaces/i_positionable.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/core/interfaces/i_positionable.js b/core/interfaces/i_positionable.js index 3ab5b88f4..ed324196b 100644 --- a/core/interfaces/i_positionable.js +++ b/core/interfaces/i_positionable.js @@ -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} savedPositions List of rectangles that + * @param {!UiMetrics} metrics The workspace metrics. + * @param {!Array} 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 elements’s bounding box. Null if + * @return {?Rect} The UI elements’s bounding box. Null if * bounding box should be ignored by other UI elements. */ IPositionable.prototype.getBoundingRectangle;