You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
1.6 KiB
6 lines
1.6 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("../../../chunks/tslib.es6 ../../../Graphic ../../../core/Accessor ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../support/featureUtils".split(" "),function(d,h,a,f,e,m,n,p,k,g){a=class extends a{constructor(b){super(b);this.graphic=this.destroyer=this.creator=this.created=this._loadingPromise=null;this.addHandles(f.watch(()=>this.creator,c=>{this._destroyContent(); |
|
this._createContent(c)},f.initial))}destroy(){this._destroyContent()}get state(){return this._loadingPromise?"loading":"ready"}_destroyContent(){const {created:b,graphic:c,destroyer:l}=this;b&&c&&(g.graphicCallback({type:"content",value:l,event:{graphic:c}}),this._set("created",null))}async _createContent(b){var c=this.graphic;c&&b&&(this._loadingPromise=b=g.graphicCallback({type:"content",value:b,event:{graphic:c}}),this.notifyChange("state"),c=await b,b===this._loadingPromise&&(this._loadingPromise= |
|
null,this.notifyChange("state"),this._set("created",c)))}};d.__decorate([e.property({readOnly:!0})],a.prototype,"created",void 0);d.__decorate([e.property()],a.prototype,"creator",void 0);d.__decorate([e.property()],a.prototype,"destroyer",void 0);d.__decorate([e.property({type:h})],a.prototype,"graphic",void 0);d.__decorate([e.property({readOnly:!0})],a.prototype,"state",null);return a=d.__decorate([k.subclass("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")],a)}); |