Custom Gis Application with Arcgis Javascript API with modern layouting
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.
 
 

7 lines
1.9 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 ../../core/has ../../core/Logger ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./Component ./UI ../../widgets/Attribution ../../widgets/Compass ../../widgets/NavigationToggle ../../widgets/Zoom".split(" "),function(f,d,v,e,h,w,k,l,m,n,p,q,r){d=class extends m{constructor(b){super(b);this._defaultPositionLookup={attribution:"manual",compass:"top-left","navigation-toggle":"top-left",
zoom:"top-left"};this.components=[];this._updateViewAwareWidgets=a=>{this.components.forEach(c=>{c=this._find(c)?.widget;void 0!==c?.view&&(c.view=a)})};this._componentsWatcher=(a,c)=>{this._removeComponents(c);this._addComponents(a);this._adjustPadding(a)}}initialize(){this.addHandles([e.watch(()=>this.components,this._componentsWatcher,e.initial),e.watch(()=>this.view,this._updateViewAwareWidgets,e.initial)])}_add(b,a,c,t,u){let g=b;if("string"===typeof b&&this._defaultPositionLookup[b]){if(this._find(b))return;
g=this._createComponent(b)}super._add(g,a,c,t,u)}_removeComponents(b){b.forEach(a=>{if(a=this._find(a))this.remove(a),a.destroy()})}_adjustPadding(b){b.includes("attribution")||this._isOverridden("padding")||({top:b}=this.padding,this.padding=b)}_addComponents(b){this.constructed&&b.forEach(a=>this.add(this._createComponent(a),this._defaultPositionLookup[a]))}_createComponent(b){const a=this._createWidget(b);return new l({id:b,node:a})}_createWidget(b){const a=this.view;switch(b){case "attribution":return new n({view:a});
case "compass":return new p({view:a});case "navigation-toggle":return new q({view:a});case "zoom":return new r({view:a})}}};f.__decorate([h.property()],d.prototype,"components",void 0);return d=f.__decorate([k.subclass("esri.views.ui.DefaultUI")],d)});