@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
24 lines (23 loc) • 567 B
JavaScript
// SPDX-License-Identifier: Apache-2.0
import ThemeLayer from './layers/themelayer.js';
import CustomIcon from '../components/themes/images/custom.svg';
export default class CustomTheme {
id;
layers;
name;
icon;
get hasThemes() {
for (const layer of this.layers) {
if (layer instanceof ThemeLayer) {
return true;
}
}
return false;
}
constructor(name) {
this.id = Date.now();
this.name = name;
this.layers = [];
this.icon = CustomIcon;
}
}