Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get layerFilterAndSortOptions(): any {
const filterSortOptions = Object.assign({
showToolbar: LayerListControlsEnum.default
}, this.layerListControls);
switch (this.layerListControls.showToolbar) {
case LayerListControlsEnum.always:
filterSortOptions.showToolbar = LayerListControlsEnum.always;
filterSortOptions.toolbarThreshold = undefined;
break;
case LayerListControlsEnum.never:
filterSortOptions.showToolbar = LayerListControlsEnum.never;
filterSortOptions.toolbarThreshold = undefined;
break;
default:
break;
}
return filterSortOptions;
}
}
}
if (this.options.layerListControls.keyword) {
filterSortOptions.keyword = this.options.layerListControls.keyword;
}
if (this.options.layerListControls.sortedAlpha) {
filterSortOptions.sortedAlpha = this.options.layerListControls.sortedAlpha;
}
if (this.options.layerListControls.onlyVisible) {
filterSortOptions.onlyVisible = this.options.layerListControls.onlyVisible;
}
if (this.options.layerListControls.onlyInRange) {
filterSortOptions.onlyInRange = this.options.layerListControls.onlyInRange;
}
switch (this.options.layerListControls.showToolbar) {
case LayerListControlsEnum.always:
filterSortOptions.showToolbar = LayerListControlsEnum.always,
filterSortOptions.toolbarThreshold = undefined;
break;
case LayerListControlsEnum.never:
filterSortOptions.showToolbar = LayerListControlsEnum.never,
filterSortOptions.toolbarThreshold = undefined;
break;
default:
break;
}
}
return filterSortOptions;
}
filterSortOptions.toolbarThreshold = this.options.layerListControls.toolbarThreshold;
}
if (this.options.layerListControls.keyword) {
filterSortOptions.keyword = this.options.layerListControls.keyword;
}
if (this.options.layerListControls.sortedAlpha) {
filterSortOptions.sortedAlpha = this.options.layerListControls.sortedAlpha;
}
if (this.options.layerListControls.onlyVisible) {
filterSortOptions.onlyVisible = this.options.layerListControls.onlyVisible;
}
if (this.options.layerListControls.onlyInRange) {
filterSortOptions.onlyInRange = this.options.layerListControls.onlyInRange;
}
switch (this.options.layerListControls.showToolbar) {
case LayerListControlsEnum.always:
filterSortOptions.showToolbar = LayerListControlsEnum.always,
filterSortOptions.toolbarThreshold = undefined;
break;
case LayerListControlsEnum.never:
filterSortOptions.showToolbar = LayerListControlsEnum.never,
filterSortOptions.toolbarThreshold = undefined;
break;
default:
break;
}
}
return filterSortOptions;
}
get layerFilterAndSortOptions(): any {
const filterSortOptions = Object.assign({
showToolbar: LayerListControlsEnum.default
}, this.layerListControls);
switch (this.layerListControls.showToolbar) {
case LayerListControlsEnum.always:
filterSortOptions.showToolbar = LayerListControlsEnum.always;
filterSortOptions.toolbarThreshold = undefined;
break;
case LayerListControlsEnum.never:
filterSortOptions.showToolbar = LayerListControlsEnum.never;
filterSortOptions.toolbarThreshold = undefined;
break;
default:
break;
}
return filterSortOptions;
}
get layerFilterAndSortOptions(): any {
const filterSortOptions = Object.assign({
showToolbar: LayerListControlsEnum.default
}, this.layerListControls);
switch (this.layerListControls.showToolbar) {
case LayerListControlsEnum.always:
filterSortOptions.showToolbar = LayerListControlsEnum.always;
filterSortOptions.toolbarThreshold = undefined;
break;
case LayerListControlsEnum.never:
filterSortOptions.showToolbar = LayerListControlsEnum.never;
filterSortOptions.toolbarThreshold = undefined;
break;
default:
break;
}
return filterSortOptions;
}
get layerFilterAndSortOptions(): any {
const filterSortOptions = Object.assign({
showToolbar: LayerListControlsEnum.default
}, this.layerListControls);
switch (this.layerListControls.showToolbar) {
case LayerListControlsEnum.always:
filterSortOptions.showToolbar = LayerListControlsEnum.always;
filterSortOptions.toolbarThreshold = undefined;
break;
case LayerListControlsEnum.never:
filterSortOptions.showToolbar = LayerListControlsEnum.never;
filterSortOptions.toolbarThreshold = undefined;
break;
default:
break;
}
return filterSortOptions;
}
}