Class: OverlayController
Defined in: src/editor/overlayController.tsx:101
Controls UI overlays for the canvases, including dialogs and tasks.
Properties
| Property | Modifier | Type |
|---|---|---|
|
Accessors
openedDialog
Get Signature
get openedDialog():
undefined|OverlayDialog
Defined in: src/editor/overlayController.tsx:152
Currently open dialog.
Returns undefined if no dialog is opened.
Returns
undefined | OverlayDialog
Methods
hideDialog()
hideDialog():
void
Defined in: src/editor/overlayController.tsx:421
Closes currently open dialog if any is active.
Returns
void
See
showDialog()
showDialog(
params):void
Defined in: src/editor/overlayController.tsx:317
Shows on-canvas dialog anchored to the target element or link.
Parameters
| Parameter | Type | Description |
|---|---|---|
| { | ‐ |
|
| Dialog content. |
| Well-known dialog type to check later if a specific dialog is currently open. | |
|
| Whether to prevent selection changes while dialog is open. Default |
| () => | Callback which is called when dialog is closed for any reason (e.g. when another dialog is opened). |
| Dialog style, placement and sizing options. | |
| Element or link to anchor dialog to. |
Returns
void
See
showSpinnerWhile()
showSpinnerWhile(
operation):void
Defined in: src/editor/overlayController.tsx:255
Creates a task via startTask for the operation defined by a Promise.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
See
startTask()
startTask(
params):OverlayTask
Defined in: src/editor/overlayController.tsx:200
Starts a new foreground task which blocks canvas interaction and displays a loading indicator until the task has ended.
If multiple tasks are started at any given time, an indicator will be shown while at least one of them is still active.
Parameters
| Parameter | Type | Description |
|---|---|---|
| { | ‐ |
|
| Delay in milliseconds before displaying loading indicator to avoid showing it in case the task ends quickly. Default |
|
| Task title to display. |