UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

62 lines (60 loc) 2.7 kB
import type Accessor from "../../../core/Accessor.js"; import type Units from "./Units.js"; import type { UnitsProperties } from "./Units.js"; import type { TooltipDirectionMode } from "../tooltip/types.js"; export interface SketchValueOptionsProperties extends Partial<Pick<SketchValueOptions, "directionMode">> { /** * Units used for displaying values in the UI. * * @beta */ displayUnits?: UnitsProperties; /** * Units used for interpreting input values. * * @beta */ inputUnits?: UnitsProperties; } /** * The `SketchValueOptions` allows users to configure how numerical values and * constraints behave while sketching and editing. * * @since 4.29 * @see [Sketch](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/) * @see [SketchViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/) * @see [SketchLabelOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchLabelOptions/) * @see [SketchTooltipOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchTooltipOptions/) * @see [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) * @see [Sample - Sketch in 3D](https://developers.arcgis.com/javascript/latest/sample-code/sketch-3d/) * @see [Sample - Edit features in 3D with the Editor widget](https://developers.arcgis.com/javascript/latest/sample-code/editor-3d/) */ export default class SketchValueOptions extends Accessor { constructor(properties?: SketchValueOptionsProperties); /** * How direction values are displayed and, in case of input, how they are interpreted. * * - When set to "relative", the direction (also called deflection) is measured relative to the previous segment.\ * Positive values are measured in a clockwise direction. Negative values are measured in a counterclockwise direction. * - When set to "absolute", the direction is measured clockwise from the main axis of the map (typically north). * * The direction mode can be toggled in the [tooltip's](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchTooltipOptions/) UI, provided the input mode is active. * * @default "relative" */ accessor directionMode: TooltipDirectionMode; /** * Units used for displaying values in the UI. * * @beta */ get displayUnits(): Units; set displayUnits(value: UnitsProperties); /** * Units used for interpreting input values. * * @beta */ get inputUnits(): Units; set inputUnits(value: UnitsProperties); }