showDimensionEditor MethodStatic
Show an input editor for a length value at a particular location.
showDimensionEditor(dimension: "length" | "height", initialValue: number, location: Readonly<WritableXAndY>, onCommit: (value: number) => void, onCancel: () => void, anchorElement?: HTMLElement): boolean
@returns true if the editor was displayed, false if the editor could not be displayed.
Parameter | Type | Description |
---|---|---|
dimension | "length" | "height" | Dimension determining which editor to display. |
initialValue | number | Value initially displayed in the editor. |
location | Readonly<WritableXAndY> | Location of the editor, relative to the origin of anchorElement or the window. |
onCommit | (value: number) => void | Function called when the OK button or the Enter key is pressed. |
onCancel | () => void | Function called when the Cancel button or the Escape key is pressed. |
anchorElement | HTMLElement | The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window. |
Returns - boolean
true if the editor was displayed, false if the editor 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.