showCard Method
Show a Card containing content, a title and a toolbar at a particular location.
showCard(content: HTMLElement, title: string | PropertyRecord, toolbarProps: AbstractToolbarProps, location: Readonly<WritableXAndY>, offset: Readonly<WritableXAndY>, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean
@returns true if the Card was displayed, false if the Card could not be displayed.
Parameter | Type | Description |
---|---|---|
content | HTMLElement | The HTMLElement of the content to display |
title | string | PropertyRecord | Title to display at the top of the card. |
toolbarProps | AbstractToolbarProps | Properties of the Toolbar to display. |
location | Readonly<WritableXAndY> | Location of the Card, relative to the origin of htmlElement or the window. |
offset | Readonly<WritableXAndY> | Offset of the Card from the location. |
onItemExecuted | OnItemExecutedFunc | Function invoked after a Toolbar item is executed |
onCancel | OnCancelFunc | Function invoked when the Escape key is pressed or a click occurs outside the Card |
relativePosition | RelativePosition | Position relative to the given location. Defaults to TopRight. |
anchorElement | HTMLElement | The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window. |
Returns - boolean
true if the Card was displayed, false if the Card could not be displayed.
Defined in
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.