import type Accessor from "../../../core/Accessor.js"; import type Units from "../support/Units.js"; import type { DirectionMode } from "../support/types.js"; import type { UnitsProperties } from "../support/Units.js"; /** @since 5.2 */ export interface ValueOptionsProperties extends Partial> { /** * Units used for displaying values in the UI. * * @since 5.2 */ displayUnits?: UnitsProperties; /** * Units used for interpreting input values. * * @since 5.2 */ inputUnits?: UnitsProperties; } /** * Configures numerical values and constraints for Sketch and Editor and their view models only. * * Set these options through the [Sketch component's valueOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#valueOptions), * [Sketch.valueOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/#valueOptions), [Editor.valueOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#valueOptions), * [SketchViewModel.valueOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/#valueOptions), or [EditorViewModel.valueOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/EditorViewModel/#valueOptions). * * To configure `displayUnits` and `inputUnits` on the view for supported components, view models, and analyses, use * [ViewOptions.displayUnits](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits) and * [ViewOptions.inputUnits](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#inputUnits) instead. * * @since 5.2 * @see [LabelOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/LabelOptions/) * @see [TooltipOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/TooltipOptions/) * @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 ValueOptions extends Accessor { /** @since 5.2 */ constructor(properties?: ValueOptionsProperties); /** * 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/options/TooltipOptions/) UI, provided the input mode is active. * * @default "relative" * @since 5.2 */ accessor directionMode: DirectionMode; /** * Units used for displaying values in the UI. * * @since 5.2 */ get displayUnits(): Units; set displayUnits(value: UnitsProperties); /** * Units used for interpreting input values. * * @since 5.2 */ get inputUnits(): Units; set inputUnits(value: UnitsProperties); }