Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table zoom should always be enabled #472

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,6 @@ export namespace Components {
* boolean: when true the share widget will be available
*/
"enableShare": boolean;
/**
* boolean: when true the zoom button will be enabled
*/
"enableZoom": boolean;
/**
* When true the component will render an optimized view for mobile devices
*/
Expand Down Expand Up @@ -2194,10 +2190,6 @@ declare namespace LocalJSX {
* boolean: when true the share widget will be available
*/
"enableShare"?: boolean;
/**
* boolean: when true the zoom button will be enabled
*/
"enableZoom"?: boolean;
/**
* When true the component will render an optimized view for mobile devices
*/
Expand Down
1 change: 0 additions & 1 deletion src/components/crowdsource-manager/crowdsource-manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,6 @@ export class CrowdsourceManager {
enableColumnReorder={this.enableColumnReorder}
enableInlineEdit={this.enableInlineEdit}
enableShare={this.enableShare}
enableZoom={this.enableZoom}
isMobile={this._isMobile}
mapInfo={this._mapInfo}
mapView={this?._mapView}
Expand Down
19 changes: 2 additions & 17 deletions src/components/layer-table/layer-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ export class LayerTable {
*/
@Prop() enableShare: boolean;

/**
* boolean: when true the zoom button will be enabled
*/
@Prop() enableZoom: boolean;

/**
* When true the component will render an optimized view for mobile devices
*/
Expand Down Expand Up @@ -367,16 +362,6 @@ export class LayerTable {
//
//--------------------------------------------------------------------------

/**
* Reset the toolInfos when zoom tool is enabled/disabled
*/
@Watch("enableZoom")
enableZoomWatchHandler(): void {
if (this._toolInfos?.length > 0) {
this._initToolInfos();
}
}

/**
* Reset the toolInfos when export csv is enabled/disabled
*/
Expand Down Expand Up @@ -867,15 +852,15 @@ export class LayerTable {
const featuresSelected = this._featuresSelected();
const featuresEmpty = this._featuresEmpty();
const hasFilterExpressions = this._hasFilterExpressions();
this._toolInfos = [this.enableZoom ? {
this._toolInfos = [{
active: false,
icon: "zoom-to-object",
indicator: false,
label: this._translations.zoom,
func: () => this._zoom(),
disabled: !featuresSelected,
isOverflow: false
} : undefined,
},
hasFilterExpressions ? {
active: false,
icon: "filter",
Expand Down
1 change: 0 additions & 1 deletion src/components/layer-table/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
| `enableColumnReorder` | `enable-column-reorder` | boolean: when true the layer table will support drag/drop of columns to adjust order | `boolean` | `true` |
| `enableInlineEdit` | `enable-inline-edit` | boolean: when true edits can be applied directly within the table | `boolean` | `undefined` |
| `enableShare` | `enable-share` | boolean: when true the share widget will be available | `boolean` | `undefined` |
| `enableZoom` | `enable-zoom` | boolean: when true the zoom button will be enabled | `boolean` | `undefined` |
| `isMobile` | `is-mobile` | When true the component will render an optimized view for mobile devices | `boolean` | `undefined` |
| `mapInfo` | -- | IMapInfo: key configuration details about the current map | `IMapInfo` | `undefined` |
| `mapView` | -- | esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html | `MapView` | `undefined` |
Expand Down
Loading