@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
65 lines (62 loc) • 1.71 kB
TypeScript
/**
* Sketch utilities for the WebEditor application.
*
* @internal
* @internal
*/
import type SketchViewModel from "../../widgets/Sketch/SketchViewModel.js";
import type { AbortOptions } from "../../core/promiseUtils.js";
/**
* Options used to show the tooltip.
*
* @internal
* @internal
*/
export interface ShowTooltipAndFocusFieldOptions extends AbortOptions {
/**
* The position where the tooltip should be shown.
*
* @internal
*/
position?: [
number,
number
];
/**
* Whether the tooltip should be hidden when it loses focus.
*
* @internal
*/
hideOnBlur?: boolean;
/**
* Callback function that is called when the tooltip is opened.
*
* @internal
*/
onOpen?: () => void;
/**
* Callback function that is called when the tooltip is closed.
*
* @internal
*/
onClose?: () => void;
}
/**
* Shows a tooltip and focuses on a specific field.
*
* @param sketchViewModel - The sketch view model.
* @param fieldName - The name of the field to focus on in the tooltip.
* @param options - Options used to show the tooltip.
* @returns A promise that resolves when the tooltip is closed.
* @internal
* @internal
*/
export function showTooltipAndFocusField(sketchViewModel: SketchViewModel, fieldName: "area" | "direction" | "distance" | "elevation" | "orientation" | "radius" | "rotation" | "scale" | "size" | "totalLength" | "x" | "y" | "coordinates", options?: ShowTooltipAndFocusFieldOptions): Promise<void>;
/**
* Hides all the tooltip visible elements.
*
* @param sketchViewModel - The sketch view model.
* @internal
* @internal
*/
export function hideAllVisibleElements(sketchViewModel: SketchViewModel): void;