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
2.1 KiB
7 lines
2.1 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/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./Widget ../chunks/componentsUtils ./support/globalCss ./support/widgetUtils ./support/decorators/messageBundle ./support/jsxFactory ./Zoom/ZoomViewModel".split(" "),function(m,c,d,b,u,v,n,p,q,f,w,r,g,h){b=class extends p{constructor(a,e){super(a,e);this.messages=null;this.viewModel=new h;this.zoomIn=()=>this.viewModel.zoomIn();this.zoomOut= |
|
()=>this.viewModel.zoomOut()}loadDependencies(){return q.loadCalciteComponents({button:()=>new Promise((a,e)=>m(["../chunks/calcite-button"],a,e))})}get icon(){return"magnifying-glass-plus"}set icon(a){this._overrideIfSome("icon",a)}get label(){return this.messages?.widgetLabel??""}set label(a){this._overrideIfSome("label",a)}set layout(a){"horizontal"!==a&&(a="vertical");this._set("layout",a)}set view(a){this.viewModel.view=a}get view(){return this.viewModel.view}render(){const a={["esri-zoom--horizontal"]:"horizontal"=== |
|
this.layout},{canZoomIn:e,canZoomOut:t}=this.viewModel,{zoomIn:k,zoomOut:l}=this.messages;return g.tsx("div",{class:this.classes("esri-zoom",f.globalCss.widget,a)},g.tsx("calcite-button",{class:f.globalCss.widgetButton,disabled:!e,iconStart:"plus",kind:"neutral",label:k,onclick:this.zoomIn,title:k}),g.tsx("calcite-button",{class:f.globalCss.widgetButton,disabled:!t,iconStart:"minus",kind:"neutral",label:l,onclick:this.zoomOut,title:l}))}};c.__decorate([d.property()],b.prototype,"icon",null);c.__decorate([d.property()], |
|
b.prototype,"label",null);c.__decorate([d.property({value:"vertical"})],b.prototype,"layout",null);c.__decorate([d.property(),r.messageBundle("esri/widgets/Zoom/t9n/Zoom")],b.prototype,"messages",void 0);c.__decorate([d.property()],b.prototype,"view",null);c.__decorate([d.property({type:h})],b.prototype,"viewModel",void 0);return b=c.__decorate([n.subclass("esri.widgets.Zoom")],b)}); |