SimpleRenderer.js 1.9 KB

12345
  1. /*
  2. All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. See https://js.arcgis.com/4.25/esri/copyright.txt for details.
  4. */
  5. import{_ as e}from"../chunks/tslib.es6.js";import{clone as s}from"../core/lang.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{enumeration as t}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import i from"./Renderer.js";import{VisualVariablesMixin as l}from"./mixins/VisualVariablesMixin.js";import{rendererSymbolProperty as a}from"./support/commonProperties.js";var c;let n=c=class extends(l(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.getSymbols().map((r=>r.collectRequiredFields(e,s))))}getSymbol(e,s){return this.symbol}async getSymbolAsync(e,s){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,s)=>e+s.getAttributeHash()),"")}getMeshHash(){return this.getSymbols().reduce(((e,s)=>e+JSON.stringify(s)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new c({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:s(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};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(a)],n.prototype,"symbol",void 0),e([t({simple:"simple"})],n.prototype,"type",void 0),n=c=e([o("esri.renderers.SimpleRenderer")],n);const p=n;export{p as default};