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;
}
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 = {
showToolbar: LayerListControlsEnum.default,
toolbarThreshold: undefined,
keyword: undefined,
sortedAlpha: undefined,
onlyVisible: undefined,
onlyInRange: undefined,
};
if (this.options && this.options.layerListControls) {
if (this.options.layerListControls.toolbarThreshold) {
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;