mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Remove require destructuring (#5294)
This commit is contained in:
@@ -25,7 +25,7 @@ const Svg = goog.requireType('Blockly.utils.Svg');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {FlyoutDefinition} = goog.requireType('Blockly.utils.toolbox');
|
||||
const toolbox = goog.requireType('Blockly.utils.toolbox');
|
||||
|
||||
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ IFlyout.prototype.hide;
|
||||
|
||||
/**
|
||||
* Show and populate the flyout.
|
||||
* @param {!FlyoutDefinition|string} flyoutDef Contents to
|
||||
* @param {!toolbox.FlyoutDefinition|string} flyoutDef Contents to
|
||||
* display in the flyout. This is either an array of Nodes, a NodeList, a
|
||||
* toolbox definition, or a string with the name of the dynamic category.
|
||||
*/
|
||||
|
||||
@@ -17,9 +17,9 @@ goog.module.declareLegacyNamespace();
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Metrics = goog.requireType('Blockly.utils.Metrics');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Size = goog.requireType('Blockly.utils.Size');
|
||||
const MetricsManager = goog.requireType('Blockly.MetricsManager');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {AbsoluteMetrics, ContainerRegion, ToolboxMetrics} = goog.requireType('Blockly.MetricsManager');
|
||||
const Size = goog.requireType('Blockly.utils.Size');
|
||||
|
||||
|
||||
/**
|
||||
@@ -39,13 +39,13 @@ IMetricsManager.prototype.hasFixedEdges;
|
||||
* Returns the metrics for the scroll area of the workspace.
|
||||
* @param {boolean=} opt_getWorkspaceCoordinates True to get the scroll metrics
|
||||
* in workspace coordinates, false to get them in pixel coordinates.
|
||||
* @param {!ContainerRegion=} opt_viewMetrics The view
|
||||
* @param {!MetricsManager.ContainerRegion=} opt_viewMetrics The view
|
||||
* metrics if they have been previously computed. Passing in null may cause
|
||||
* the view metrics to be computed again, if it is needed.
|
||||
* @param {!ContainerRegion=} opt_contentMetrics The
|
||||
* @param {!MetricsManager.ContainerRegion=} opt_contentMetrics The
|
||||
* content metrics if they have been previously computed. Passing in null
|
||||
* may cause the content metrics to be computed again, if it is needed.
|
||||
* @return {!ContainerRegion} The metrics for the scroll
|
||||
* @return {!MetricsManager.ContainerRegion} The metrics for the scroll
|
||||
* container
|
||||
*/
|
||||
IMetricsManager.prototype.getScrollMetrics;
|
||||
@@ -55,7 +55,7 @@ IMetricsManager.prototype.getScrollMetrics;
|
||||
* coordinates. Returns 0 for the width and height if the workspace has a
|
||||
* category toolbox instead of a simple toolbox.
|
||||
* @param {boolean=} opt_own Whether to only return the workspace's own flyout.
|
||||
* @return {!ToolboxMetrics} The width and height of the
|
||||
* @return {!MetricsManager.ToolboxMetrics} The width and height of the
|
||||
* flyout.
|
||||
* @public
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ IMetricsManager.prototype.getFlyoutMetrics;
|
||||
* coordinates. Returns 0 for the width and height if the workspace has a simple
|
||||
* toolbox instead of a category toolbox. To get the width and height of a
|
||||
* simple toolbox @see {@link getFlyoutMetrics}.
|
||||
* @return {!ToolboxMetrics} The object with the width,
|
||||
* @return {!MetricsManager.ToolboxMetrics} The object with the width,
|
||||
* height and position of the toolbox.
|
||||
* @public
|
||||
*/
|
||||
@@ -84,7 +84,7 @@ IMetricsManager.prototype.getSvgMetrics;
|
||||
/**
|
||||
* Gets the absolute left and absolute top in pixel coordinates.
|
||||
* This is where the visible workspace starts in relation to the SVG container.
|
||||
* @return {!AbsoluteMetrics} The absolute metrics for
|
||||
* @return {!MetricsManager.AbsoluteMetrics} The absolute metrics for
|
||||
* the workspace.
|
||||
* @public
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ IMetricsManager.prototype.getAbsoluteMetrics;
|
||||
* coordinates. The visible workspace does not include the toolbox or flyout.
|
||||
* @param {boolean=} opt_getWorkspaceCoordinates True to get the view metrics in
|
||||
* workspace coordinates, false to get them in pixel coordinates.
|
||||
* @return {!ContainerRegion} The width, height, top and
|
||||
* @return {!MetricsManager.ContainerRegion} The width, height, top and
|
||||
* left of the viewport in either workspace coordinates or pixel
|
||||
* coordinates.
|
||||
* @public
|
||||
@@ -108,7 +108,7 @@ IMetricsManager.prototype.getViewMetrics;
|
||||
* workspace (workspace comments and blocks).
|
||||
* @param {boolean=} opt_getWorkspaceCoordinates True to get the content metrics
|
||||
* in workspace coordinates, false to get them in pixel coordinates.
|
||||
* @return {!ContainerRegion} The
|
||||
* @return {!MetricsManager.ContainerRegion} The
|
||||
* metrics for the content container.
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -17,9 +17,9 @@ goog.module.declareLegacyNamespace();
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const IComponent = goog.require('Blockly.IComponent');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Rect = goog.requireType('Blockly.utils.Rect');
|
||||
const MetricsManager = goog.requireType('Blockly.MetricsManager');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {UiMetrics} = goog.requireType('Blockly.MetricsManager');
|
||||
const Rect = goog.requireType('Blockly.utils.Rect');
|
||||
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ const IPositionable = function() {};
|
||||
|
||||
/**
|
||||
* Positions the element. Called when the window is resized.
|
||||
* @param {!UiMetrics} metrics The workspace metrics.
|
||||
* @param {!MetricsManager.UiMetrics} metrics The workspace metrics.
|
||||
* @param {!Array<!Rect>} savedPositions List of rectangles that
|
||||
* are already on the workspace.
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.module.declareLegacyNamespace();
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const IToolboxItem = goog.require('Blockly.IToolboxItem');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {FlyoutItemInfoArray} = goog.requireType('Blockly.utils.toolbox');
|
||||
const toolbox = goog.requireType('Blockly.utils.toolbox');
|
||||
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ ISelectableToolboxItem.prototype.getName;
|
||||
/**
|
||||
* Gets the contents of the toolbox item. These are items that are meant to be
|
||||
* displayed in the flyout.
|
||||
* @return {!FlyoutItemInfoArray|string} The definition
|
||||
* @return {!toolbox.FlyoutItemInfoArray|string} The definition
|
||||
* of items to be displayed in the flyout.
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ const IToolboxItem = goog.requireType('Blockly.IToolboxItem');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {ToolboxInfo} = goog.requireType('Blockly.utils.toolbox');
|
||||
const toolbox = goog.requireType('Blockly.utils.toolbox');
|
||||
|
||||
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ IToolbox.prototype.init;
|
||||
|
||||
/**
|
||||
* Fills the toolbox with new toolbox items and removes any old contents.
|
||||
* @param {!ToolboxInfo} toolboxDef Object holding information
|
||||
* @param {!toolbox.ToolboxInfo} toolboxDef Object holding information
|
||||
* for creating a toolbox.
|
||||
*/
|
||||
IToolbox.prototype.render;
|
||||
|
||||
Reference in New Issue
Block a user