@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 1.19 kB
JavaScript
import{_ as r}from"../../../chunks/tslib.es6.js";import{HandleOwner as e}from"../../../core/HandleOwner.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{findLayerView as o}from"./layerUtils.js";import{highlightsSupported as i}from"../../support/layerViewUtils.js";let l=class extends e{constructor(r){super(r),this.view=null}get count(){return this.handles.size}add(r){const e=Array.isArray(r)?r:[r];null!=r&&e&&e.length&&e.forEach((r=>this._highlight(r)))}remove(r){const e=Array.isArray(r)?r:[r];null!=r&&e&&e.length&&e.forEach((r=>this._unhighlight(r)))}removeAll(){this.handles.removeAll()}_highlight(r){const e=o(this.view,r.layer);i(e)&&this.handles.add(e.highlight(r),`feature-${r.getObjectId()}`)}_unhighlight(r){r&&this.handles.remove(`feature-${r.getObjectId()}`)}};r([t({readOnly:!0})],l.prototype,"count",null),r([t()],l.prototype,"view",void 0),r([t()],l.prototype,"add",null),l=r([s("esri.views.draw.support.HighlightHelper")],l);const h=l;export{h as default};