@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.84 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../intl.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import s from"../SmartMappingSliderViewModel.js";import{fetchMessageBundle as r}from"../../../intl/messages.js";import{onLocaleChange as a}from"../../../intl/locale.js";let i=class extends s{constructor(t){super(t),this.hasTimeData=!1,this.labelFormatFunction=(t,e)=>"min"===e?this.messages.bottomLabel:"max"===e?this.messages.topLabel:t.toString(),this.max=1,this.messages=null,this.min=0,this.zoomingEnabled=!1}initialize(){const t=async()=>this.messages=await r("esri/widgets/smartMapping/HeatmapSlider/t9n/HeatmapSlider");t(),this.addHandles(a(t))}get state(){const{messages:t,max:e,min:o}=this;return t&&null!=e&&null!=o?"ready":"disabled"}get values(){const{stops:t}=this;return!t?.length||t.length<2?[]:[t[0].ratio,t[t.length-1].ratio]}getStopInfo(){const{stops:t}=this;return t?.length?t.map((t=>({color:t.color,offset:1-t.ratio}))):[]}};t([e({readOnly:!0})],i.prototype,"hasTimeData",void 0),t([e({readOnly:!0})],i.prototype,"labelFormatFunction",void 0),t([e({readOnly:!0})],i.prototype,"max",void 0),t([e()],i.prototype,"messages",void 0),t([e({readOnly:!0})],i.prototype,"min",void 0),t([e({readOnly:!0})],i.prototype,"state",null),t([e({readOnly:!0})],i.prototype,"values",null),t([e({readOnly:!0})],i.prototype,"zoomingEnabled",void 0),i=t([o("esri.widgets.smartMapping.HeatmapSlider.HeatmapSliderViewModel")],i);const l=i;export{l as default};