UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 659 B
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{__decorate as e}from"tslib";import t from"../core/Logger.js";import{subclass as o}from"../core/accessorSupport/decorators.js";import{OwningCollection as r}from"../core/support/OwningCollection.js";let s=class extends r{constructor(e){super(e),this.addHandles(this.on("before-add",e=>{null!=e.item&&e.item.parent===this.owner&&(t.getLogger(this).warn("Analysis inside the collection must be unique. Not adding this element again."),e.preventDefault())}))}_own(e){e.parent=this.owner}_release(e){e.parent=null}};s=e([o("esri.support.AnalysesCollection")],s);export{s as AnalysesCollection};