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.
 
 

10 lines
3.7 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("require ../chunks/tslib.es6 ../core/has ../core/promiseUtils ../core/accessorSupport/decorators/property ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./Widget ./LineOfSight/LineOfSightViewModel ../chunks/componentsUtils ./support/globalCss ./support/widgetUtils ./support/decorators/messageBundle ./support/jsxFactory".split(" "),function(k,d,b,l,e,v,w,m,n,g,p,h,x,q,f){b=class extends n{constructor(a,c){super(a,c);this.messages=null;this.viewModel=new g;this._onNewAnalysis=
()=>{l.ignoreAbortErrors(this.viewModel.start())};this._onDone=()=>{this.viewModel.stop()};this._onContinue=()=>{this.viewModel.continue()}}loadDependencies(){return p.loadCalciteComponents({button:()=>new Promise((a,c)=>k(["../chunks/calcite-button"],a,c))})}get active(){return this.viewModel.active}get analysis(){return this.viewModel.analysis}set analysis(a){this.viewModel.analysis=a}get icon(){return"line-of-sight"}set icon(a){this._overrideIfSome("icon",a)}get label(){return this.messages?.widgetLabel??
""}set label(a){this._overrideIfSome("label",a)}get view(){return this.viewModel.view}set view(a){this.viewModel.view=a}get visible(){return this.viewModel.visible}set visible(a){this.viewModel.visible=a}render(){return f.tsx("div",{class:this.classes("esri-line-of-sight",h.globalCss.widget,h.globalCss.panel),role:"presentation"},this._renderContainerNode())}_renderContainerNode(){if(!this.visible)return null;if(!this.viewModel.supported)return this._renderUnsupportedMessage();let a=null;const c=
[this._renderNewAnalysisButton()];"creating"===this.viewModel.state?(a=this._renderHint(),c.unshift(this._renderDoneButton())):"created"===this.viewModel.state&&0<this.viewModel.targets.length&&c.unshift(this._renderContinueButton());return f.tsx("div",{class:"esri-line-of-sight__container"},a,f.tsx("div",{class:"esri-line-of-sight__actions"},c))}_renderUnsupportedMessage(){return f.tsx("div",{class:"esri-line-of-sight__error",key:"esri-line-of-sight__unsupported"},f.tsx("p",null,this.messages.unsupported))}_renderHint(){return f.tsx("div",
{class:"esri-line-of-sight__hint",key:"esri-line-of-sight__hint"},f.tsx("p",{class:"esri-line-of-sight__hint-text"},this.messages.hint))}_renderNewAnalysisButton(){return this._renderButton({className:"esri-line-of-sight__new-analysis-button",id:"esri-line-of-sight__new-button",label:this.messages.newAnalysis,onClick:this._onNewAnalysis,primary:!0})}_renderDoneButton(){return this._renderButton({id:"esri-line-of-sight__done-button",label:this.messages.done,onClick:this._onDone,primary:!1})}_renderContinueButton(){return this._renderButton({id:"esri-line-of-sight__new-button",
label:this.messages.continueAnalysis,onClick:this._onContinue,primary:!1})}_renderButton({className:a,id:c,label:r,onClick:t,primary:u}){return f.tsx("calcite-button",{appearance:u?"solid":"outline-fill",class:a,"data-id":c,disabled:"disabled"===this.viewModel.state,key:c,onclick:t},r)}get test(){}};d.__decorate([e.property()],b.prototype,"active",null);d.__decorate([e.property({constructOnly:!0,nonNullable:!0})],b.prototype,"analysis",null);d.__decorate([e.property()],b.prototype,"icon",null);d.__decorate([e.property()],
b.prototype,"label",null);d.__decorate([e.property(),q.messageBundle("esri/widgets/LineOfSight/t9n/LineOfSight")],b.prototype,"messages",void 0);d.__decorate([e.property()],b.prototype,"view",null);d.__decorate([e.property({type:g})],b.prototype,"viewModel",void 0);d.__decorate([e.property()],b.prototype,"visible",null);return b=d.__decorate([m.subclass("esri.widgets.LineOfSight")],b)});