@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.65 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as e}from"tslib";import{clone as s}from"../core/lang.js";import{property as r,subclass as t}from"../core/accessorSupport/decorators.js";import i from"./Renderer.js";import{VisualVariablesMixin as o}from"./mixins/VisualVariablesMixin.js";import{requiredRendererSymbolProperty as l}from"./support/commonProperties.js";import{enumeration as a}from"../core/accessorSupport/decorators/enumeration.js";var m;let n=m=class extends(o(i)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,s){await Promise.all([this.collectSymbolFields(e,s),this.collectVVRequiredFields(e,s)])}async collectSymbolFields(e,s){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,s)))}getSymbol(e,s){return this.symbol}async getSymbolAsync(e,s){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,s)=>e+s.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,s)=>e+JSON.stringify(s),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new m({description:this.description,label:this.label,symbol:s(this.symbol),visualVariables:s(this.visualVariables),authoringInfo:s(this.authoringInfo)})}};e([r({type:String,json:{write:!0}})],n.prototype,"description",void 0),e([r({type:String,json:{write:!0}})],n.prototype,"label",void 0),e([r(l)],n.prototype,"symbol",void 0),e([a({simple:"simple"})],n.prototype,"type",void 0),n=m=e([t("esri.renderers.SimpleRenderer")],n);export{n as default};