mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Migrate core/interfaces/i_positionable.js named requires
This commit is contained in:
@@ -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 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;
|
||||
|
||||
Reference in New Issue
Block a user