UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.3 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import t from"../../Widget.js";import{legendCss as r}from"../css.js";import{LegendItem as i}from"./LegendItem.js";import"../../support/widgetUtils.js";import{tsx as p}from"../../support/jsxFactory.js";let n=class extends t{constructor(){super(...arguments),this._expandedLine=null}render(){const{profiles:e,messages:o,effectiveUnits:s,_expandedLine:t}=this;return p("div",{class:r.base},e.map((r=>p(i,{checkboxVisible:e.length>1,effectiveUnits:s,expanded:r===t,line:r,messages:o,onExpandedToggle:()=>this._onExpandedToggle(r)}))))}_onExpandedToggle(e){this._expandedLine=e===this._expandedLine?null:e}};e([o()],n.prototype,"effectiveUnits",void 0),e([o()],n.prototype,"messages",void 0),e([o()],n.prototype,"profiles",void 0),e([o()],n.prototype,"_expandedLine",void 0),n=e([s("esri.widgets.ElevationProfile.components.Legend")],n);export{n as Legend};