FlowRenderer.js 2.8 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 o}from"../chunks/tslib.es6.js";import t from"../Color.js";import{JSONMap as e}from"../core/jsonMap.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{toPt as i}from"../core/screenUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/accessorSupport/ensureType.js";import{enumeration as n}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{VisualVariablesMixin as a}from"./mixins/VisualVariablesMixin.js";import l from"./support/AuthoringInfo.js";import{LegendOptions as m}from"./support/LegendOptions.js";var c;const d=new e({flow_from:"flow-from",flow_to:"flow-to"});let h=c=class extends(a(r)){constructor(o){super(o),this.density=.8,this.color=new t([255,255,255,1]),this.maxPathLength=200,this.trailWidth=1.5,this.flowSpeed=10,this.trailLength=100,this.smoothing=0,this.flowRepresentation="flow-from",this.type="flow",this.authoringInfo=null,this.legendOptions=null,this.trailCap="butt",this.background="none"}clone(){const{density:o,maxPathLength:t,trailWidth:e,flowSpeed:r,trailLength:i,smoothing:s,flowRepresentation:n,trailCap:p,background:a}=this,l=this.color.clone(),m=(this.visualVariables||[]).map((o=>o.clone())),d=this.authoringInfo?.clone(),h=this.legendOptions?.clone();return new c({density:o,color:l,maxPathLength:t,trailWidth:e,flowSpeed:r,trailLength:i,trailCap:p,background:a,smoothing:s,flowRepresentation:n,visualVariables:m,authoringInfo:d,legendOptions:h})}getSymbol(o,t){}async getSymbolAsync(o,t){}getSymbols(){return[]}};o([s({type:Number,json:{write:!0}})],h.prototype,"density",void 0),o([s({type:t,json:{write:{allowNull:!0}}})],h.prototype,"color",void 0),o([s({type:Number,cast:i,json:{write:!0}})],h.prototype,"maxPathLength",void 0),o([s({type:Number,cast:i,json:{write:!0}})],h.prototype,"trailWidth",void 0),o([s({type:Number,json:{write:!0}})],h.prototype,"flowSpeed",void 0),o([s({type:Number,json:{write:!0}})],h.prototype,"trailLength",void 0),o([s({type:Number,cast:i,json:{write:!1}})],h.prototype,"smoothing",void 0),o([s({type:d.apiValues,json:{type:d.jsonValues,read:{reader:d.read},write:{writer:d.write}}})],h.prototype,"flowRepresentation",void 0),o([n({flowRenderer:"flow"})],h.prototype,"type",void 0),o([s({type:l,json:{write:!0}})],h.prototype,"authoringInfo",void 0),o([s({type:m,json:{write:!0}})],h.prototype,"legendOptions",void 0),o([s({type:String,json:{write:!0}})],h.prototype,"trailCap",void 0),o([s({type:String,json:{write:!0}})],h.prototype,"background",void 0),h=c=o([p("esri.renderers.FlowRenderer")],h);const u=h;export{u as default};