Flyout class
Class for a flyout.
Signature:
export declare abstract class Flyout extends DeleteArea implements IAutoHideable, IFlyout
Extends: DeleteArea
Implements: IAutoHideable, IFlyout
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
boolean | Does the flyout automatically close when a block is created? | ||
| List of flyout elements. | ||
| number | Corner radius of the flyout background. | |
| number | ||
| number | ||
| number | Height of flyout. | |
| Map<string, IFlyoutInflater> | Map from flyout content type to the corresponding inflater class responsible for creating concrete instances of the content type. | |
| number | ||
boolean | |||
| number | Top/bottom padding between scrollbar and edge of flyout background. | |
| SVGPathElement | null | The path around the background of the flyout, which will be filled with a background colour. | |
| SVGGElement | null | The root SVG group for the button or label. | |
| number | ||
| number | ||
| number | Width of flyout. | |
|
Methods
Method | Modifiers | Description |
|---|---|---|
Automatically hides the flyout if it is an autoclosing flyout. | ||
Creates the flyout's DOM. Only needs to be called once. The flyout can either exist as its own SVG element or be a g element nested inside a separate SVG element. | ||
Dispose of this flyout. Unlink from all DOM elements to prevent memory leaks. | ||
Get the list of elements of the current flyout. | ||
Get the scale (zoom level) of the flyout. By default, this matches the target workspace scale, but this can be overridden. | ||
Get the height of the flyout. | ||
| Returns the inflater responsible for constructing items of the given type. | |
Get the target workspace inside the flyout. | ||
Get the width of the flyout. | ||
Get the workspace inside the flyout. | ||
| Calculates the x coordinate for the flyout position. | |
| Calculates the y coordinate for the flyout position. | |
Hide and empty the flyout. | ||
Initializes the flyout. | ||
Is the flyout visible? | ||
| Lay out the elements in the flyout. | |
| Updates and returns the provided list of flyout contents to flatten separators as needed. When multiple separators occur one after another, the value of the last one takes precedence and the earlier separators in the group are removed. | |
| Position the flyout. | |
| Update the view based on coordinates calculated in position(). | |
Reflow flyout contents. | ||
| Compute bounds of flyout. For RTL: Lay out the elements right-aligned. | |
| Scroll the flyout to the beginning of its contents. | |
Sets whether this flyout automatically closes when blocks are dragged out, the workspace is clicked, etc, or not. | ||
Set whether this flyout's container is visible. | ||
Store the list of elements on the flyout. | ||
| Sets the translation of the flyout to match the scrollbars. | |
Set whether the flyout is visible. A value of true does not necessarily mean that the flyout is shown. It could be hidden because its container is hidden. | ||
Show and populate the flyout. | ||
| Updates the aria attributes for the entire flyout dom. This needs to do two things: 1. Set aria-owns on the flyout's workspace canvas to include the ids of all focusable elements in the flyout. 2. Update the aria attributes on the flyout's workspace. This can't be done at workspace creation because the workspace may not have all required information until the flyout is fully shown. | |
| Scroll the flyout. |