From 25d9acb418dd9bc906d57a276656155b5ba18aa4 Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Tue, 10 Jan 2023 13:54:51 -0800 Subject: [PATCH] fix: correct docs for flyout metrics (#6751) --- blocks/procedures.js | 2 +- core/interfaces/i_metrics_manager.ts | 14 ++++++++------ core/metrics_manager.ts | 14 ++++++++------ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/blocks/procedures.js b/blocks/procedures.js index 523003f7e..785b0bba2 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -975,7 +975,7 @@ const procedureCallerGetDefMixin = function() { 'fields': {'NAME': newName}, }; return serialization.blocks.append(blockDef, this.getTargetWorkspace_()) - .getProcedureModel(); + .getProcedureModel(); }, /** diff --git a/core/interfaces/i_metrics_manager.ts b/core/interfaces/i_metrics_manager.ts index 923ad8035..be82b4991 100644 --- a/core/interfaces/i_metrics_manager.ts +++ b/core/interfaces/i_metrics_manager.ts @@ -47,11 +47,14 @@ export interface IMetricsManager { opt_contentMetrics?: ContainerRegion): ContainerRegion; /** - * Gets the width and the height of the flyout on the workspace in pixel - * coordinates. Returns 0 for the width and height if the workspace has a - * category toolbox instead of a simple toolbox. + * Gets the width and the height of the flyout in pixel + * coordinates. By default, will get metrics for either a simple flyout (owned + * directly by the workspace) or for the flyout owned by the toolbox. If you + * pass `opt_own` as `true` then only metrics for the simple flyout will be + * returned, and it will return 0 for the width and height if the workspace + * has a category toolbox instead of a simple toolbox. * - * @param opt_own Whether to only return the workspace's own flyout. + * @param opt_own Whether to only return the workspace's own flyout metrics. * @returns The width and height of the flyout. */ getFlyoutMetrics(opt_own?: boolean): ToolboxMetrics; @@ -60,8 +63,7 @@ export interface IMetricsManager { * Gets the width, height and position of the toolbox on the workspace in * pixel 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 IMetricsManager#getFlyoutMetrics}. + * of a simple toolbox, see {@link IMetricsManager#getFlyoutMetrics}. * * @returns The object with the width, height and position of the toolbox. */ diff --git a/core/metrics_manager.ts b/core/metrics_manager.ts index 7d8ba5cf9..082a8c3a9 100644 --- a/core/metrics_manager.ts +++ b/core/metrics_manager.ts @@ -55,11 +55,14 @@ export class MetricsManager implements IMetricsManager { } /** - * Gets the width and the height of the flyout on the workspace in pixel - * coordinates. Returns 0 for the width and height if the workspace has a - * category toolbox instead of a simple toolbox. + * Gets the width and the height of the flyout in pixel + * coordinates. By default, will get metrics for either a simple flyout (owned + * directly by the workspace) or for the flyout owned by the toolbox. If you + * pass `opt_own` as `true` then only metrics for the simple flyout will be + * returned, and it will return 0 for the width and height if the workspace + * has a category toolbox instead of a simple toolbox. * - * @param opt_own Whether to only return the workspace's own flyout. + * @param opt_own Whether to only return the workspace's own flyout metrics. * @returns The width and height of the flyout. */ getFlyoutMetrics(opt_own?: boolean): ToolboxMetrics { @@ -76,8 +79,7 @@ export class MetricsManager implements IMetricsManager { * Gets the width, height and position of the toolbox on the workspace in * pixel 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 MetricsManager#getFlyoutMetrics}. + * of a simple toolbox, see {@link MetricsManager#getFlyoutMetrics}. * * @returns The object with the width, height and position of the toolbox. */