UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.43 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{_ as r}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{findLayerView as e}from"./layerUtils.js";import{defaultHighlightName as i}from"../../support/HighlightDefaults.js";import{highlightsSupported as h}from"../../support/layerViewUtils.js";import{getHighlightKeyForFeature as l}from"../../../widgets/Feature/support/featureUtils.js";let a=class extends t{constructor(r){super(r),this.view=null,this.highlightName=i}add(r){const t=!r||Array.isArray(r)?r:[r];t?.length&&t.forEach((r=>this._highlight(r)))}remove(r){const t=!r||Array.isArray(r)?r:[r];t?.length&&t.forEach((r=>this._removeHighlight(r)))}removeAll(){this.removeAllHandles()}_highlight(r){const t=e(this.view,r.layer);h(t)&&this.addHandles(t.highlight(r,{name:this.highlightName}),l(r))}_removeHighlight(r){r&&this.removeHandles(l(r))}};r([o()],a.prototype,"view",void 0),r([o({constructOnly:!0})],a.prototype,"highlightName",void 0),a=r([s("esri.views.draw.support.HighlightHelper")],a);const p=a;export{p as default};