@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
86 lines (84 loc) • 3.54 kB
TypeScript
import type Accessor from "../../../core/Accessor.js";
/** @since 5.0 */
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "colorSelection" | "dynamicScaleToggle" | "gridEnabledToggle" | "gridSnapEnabledToggle" | "lineIntervalInput" | "numericInputs" | "outOfScaleWarning" | "placementButtons" | "rotateWithMapToggle">> {}
/**
* The visible elements that are displayed within the widget.
* This provides the ability to toggle visibility for individual elements within the widget.
*
* @since 5.0
* @example
* // This removes the `dynamicScaleToggle` and `gridEnabledToggle`
* gridControls.visibleElements = {
* dynamicScaleToggle: false,
* gridEnabledToggle: false
* }
*/
export default class VisibleElements extends Accessor {
constructor(properties?: VisibleElementsProperties);
/**
* Indicates whether to display the buttons to change the color of the grid. Default is `true`. This controls the [GridControlsViewModel.gridColor](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/GridControls/GridControlsViewModel/#gridColor).
*
* @default true
* @since 5.0
*/
accessor colorSelection: boolean;
/**
* Indicates whether to display the `dynamicScaleToggle`. Default is `true`. This toggles
* the [GridControlsViewModel.dynamicScaling](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/GridControls/GridControlsViewModel/#dynamicScaling) property.
*
* @default true
* @since 5.0
*/
accessor dynamicScaleToggle: boolean;
/**
* Indicates whether to display the `gridEnabledToggle`. Default is `true`. This enables / disables the grid.
*
* @default true
* @since 5.0
*/
accessor gridEnabledToggle: boolean;
/**
* Indicates whether to display the `gridSnapEnabledToggle`. This enables / disables snapping to the grid.
*
* @default true
* @since 5.0
*/
accessor gridSnapEnabledToggle: boolean;
/**
* Indicates whether to display the `lineIntervalInput`. Default is `true`. This defines the [GridControlsViewModel.majorLineInterval](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/GridControls/GridControlsViewModel/#majorLineInterval), which controls the number of grid lines between opaque grid lines.
*
* @default true
* @since 5.0
*/
accessor lineIntervalInput: boolean;
/**
* Indicates whether to display the `numericInputs`. Default is `true`. Defines the spacing in between grid lattices and the angle.
*
* @default true
* @since 5.0
*/
accessor numericInputs: boolean;
/**
* Indicates whether to display a notice when the grid is not visible because it is out of scale and dynamic scaling is turned off. Default is `true`.
*
* @default true
* @since 5.0
*/
accessor outOfScaleWarning: boolean;
/**
* Indicates whether to display `placementButtons`. Default is `true`. The buttons allow for placing, moving, and rotating the grid.
*
* @default true
* @since 5.0
*/
accessor placementButtons: boolean;
/**
* Indicates whether to display the `rotateWithMapToggle`. Default is `true`.
* This toggles the [GridControlsViewModel.rotateWithMap](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/GridControls/GridControlsViewModel/#rotateWithMap) property.
* When `true`, rotating the map also rotates the grid on screen.
*
* @default true
* @since 5.0
*/
accessor rotateWithMapToggle: boolean;
}