@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.87 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 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/has.js";import"../core/Logger.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{requiredRendererSymbolProperty as a}from"./support/commonProperties.js";var c;let m=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.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 c({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}})],m.prototype,"description",void 0),e([r({type:String,json:{write:!0}})],m.prototype,"label",void 0),e([r(a)],m.prototype,"symbol",void 0),e([t({simple:"simple"})],m.prototype,"type",void 0),m=c=e([o("esri.renderers.SimpleRenderer")],m);export{m as default};