UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.49 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 o}from"../../../chunks/tslib.es6.js";import{clone as t}from"../../../core/lang.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{convolutionKernel as e}from"../rasterFunctionConstants.js";import n from"./BaseFunctionArguments.js";import{convolutionKernels as i}from"./convolutionUtils.js";var p;let c=p=class extends n{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(o){this._set("convolutionType",o);const t=i.get(o);if(!t||o===e.userDefined||o===e.none)return;const s=Math.sqrt(t.length);this._set("kernel",t),this._set("cols",s),this._set("rows",s)}clone(){return new p({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:t(this.raster)})}};o([s({json:{type:Number,write:!0}})],c.prototype,"rows",void 0),o([s({json:{type:Number,write:!0}})],c.prototype,"cols",void 0),o([s({json:{name:"type",type:Number,write:!0}})],c.prototype,"convolutionType",null),o([s({json:{type:[Number],write:!0}})],c.prototype,"kernel",void 0),c=p=o([r("esri.layers.support.rasterFunctions.ConvolutionFunctionArguments")],c);const l=c;export{l as default};