UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 2.3 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as t}from"../chunks/tslib.es6.js";import{px2pt as e}from"../core/screenUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{enumeration as o}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import i from"./LineStyleMarker3D.js";import l from"./Symbol3DLayer.js";import p from"./patterns/LineStylePattern3D.js";import{symbol3dLinePatternProperty as a}from"./patterns/utils.js";import{white as n}from"./support/colors.js";import{screenSizeProperty as m}from"./support/materialUtils.js";import{Symbol3DMaterial as c}from"./support/Symbol3DMaterial.js";import{lineJoins as y,lineCaps as u}from"./support/symbolLayerUtils3D.js";var j;let d=class extends l{static{j=this}constructor(t){super(t),this.material=null,this.type="line",this.join="miter",this.cap="butt",this.size=e(1),this.pattern=null,this.marker=null}clone(){const t={enabled:this.enabled,material:null!=this.material?this.material.clone():null,size:this.size,join:this.join,cap:this.cap,pattern:null!=this.pattern?this.pattern.clone():null,marker:null!=this.marker?this.marker.clone():null};return new j(t)}static fromSimpleLineSymbol(t){const r={enabled:!0,size:t.width??e(1),cap:t.cap||"butt",join:t.join||"miter",pattern:t.style?new p({style:t.style}):null,material:new c({color:(t.color||n).clone()}),marker:t.marker?new i({placement:t.marker.placement,style:t.marker.style,color:t.marker.color?.clone()??null}):null};return new j(r)}};t([r({type:c,json:{write:!0}})],d.prototype,"material",void 0),t([o({Line:"line"},{readOnly:!0})],d.prototype,"type",void 0),t([r({type:y,json:{write:!0,default:"miter"}})],d.prototype,"join",void 0),t([r({type:u,json:{write:!0,default:"butt"}})],d.prototype,"cap",void 0),t([r({...m,json:{write:{isRequired:!0}}})],d.prototype,"size",void 0),t([r(a)],d.prototype,"pattern",void 0),t([r({types:{key:"type",base:i,typeMap:{style:i}},json:{write:!0}})],d.prototype,"marker",void 0),d=j=t([s("esri.symbols.LineSymbol3DLayer")],d);export{d as default};