mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
fix: correct docs for flyout metrics (#6751)
This commit is contained in:
committed by
GitHub
parent
8978f573d3
commit
25d9acb418
@@ -975,7 +975,7 @@ const procedureCallerGetDefMixin = function() {
|
|||||||
'fields': {'NAME': newName},
|
'fields': {'NAME': newName},
|
||||||
};
|
};
|
||||||
return serialization.blocks.append(blockDef, this.getTargetWorkspace_())
|
return serialization.blocks.append(blockDef, this.getTargetWorkspace_())
|
||||||
.getProcedureModel();
|
.getProcedureModel();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -47,11 +47,14 @@ export interface IMetricsManager {
|
|||||||
opt_contentMetrics?: ContainerRegion): ContainerRegion;
|
opt_contentMetrics?: ContainerRegion): ContainerRegion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the width and the height of the flyout on the workspace in pixel
|
* Gets the width and the height of the flyout in pixel
|
||||||
* coordinates. Returns 0 for the width and height if the workspace has a
|
* coordinates. By default, will get metrics for either a simple flyout (owned
|
||||||
* category toolbox instead of a simple toolbox.
|
* 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.
|
* @returns The width and height of the flyout.
|
||||||
*/
|
*/
|
||||||
getFlyoutMetrics(opt_own?: boolean): ToolboxMetrics;
|
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
|
* 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
|
* 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
|
* a simple toolbox instead of a category toolbox. To get the width and height
|
||||||
* of a
|
* of a simple toolbox, see {@link IMetricsManager#getFlyoutMetrics}.
|
||||||
* simple toolbox @see {@link IMetricsManager#getFlyoutMetrics}.
|
|
||||||
*
|
*
|
||||||
* @returns The object with the width, height and position of the toolbox.
|
* @returns The object with the width, height and position of the toolbox.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -55,11 +55,14 @@ export class MetricsManager implements IMetricsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the width and the height of the flyout on the workspace in pixel
|
* Gets the width and the height of the flyout in pixel
|
||||||
* coordinates. Returns 0 for the width and height if the workspace has a
|
* coordinates. By default, will get metrics for either a simple flyout (owned
|
||||||
* category toolbox instead of a simple toolbox.
|
* 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.
|
* @returns The width and height of the flyout.
|
||||||
*/
|
*/
|
||||||
getFlyoutMetrics(opt_own?: boolean): ToolboxMetrics {
|
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
|
* 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
|
* 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
|
* a simple toolbox instead of a category toolbox. To get the width and height
|
||||||
* of a
|
* of a simple toolbox, see {@link MetricsManager#getFlyoutMetrics}.
|
||||||
* simple toolbox @see {@link MetricsManager#getFlyoutMetrics}.
|
|
||||||
*
|
*
|
||||||
* @returns The object with the width, height and position of the toolbox.
|
* @returns The object with the width, height and position of the toolbox.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user