UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 1.52 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.19/LICENSE.txt */ import{__decorate as t}from"tslib";import{onLocaleChange as e,fetchMessageBundle as s}from"../../../intl.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import i from"../SmartMappingSliderViewModel.js";let r=class extends i{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 s("esri/widgets/smartMapping/HeatmapSlider/t9n/HeatmapSlider")};t(),this.addHandles(e(t))}get state(){const{messages:t,max:e,min:s}=this;return t&&null!=e&&null!=s?"ready":"disabled"}set stops(t){super.stops=t}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([o({readOnly:!0})],r.prototype,"hasTimeData",void 0),t([o({readOnly:!0})],r.prototype,"labelFormatFunction",void 0),t([o({readOnly:!0})],r.prototype,"max",void 0),t([o()],r.prototype,"messages",void 0),t([o({readOnly:!0})],r.prototype,"min",void 0),t([o({readOnly:!0})],r.prototype,"state",null),t([o({readOnly:!0})],r.prototype,"values",null),t([o({readOnly:!0})],r.prototype,"zoomingEnabled",void 0),r=t([a("esri.widgets.smartMapping.HeatmapSlider.HeatmapSliderViewModel")],r);const l=r;export{l as default};