@geogirafe/lib-geoportal 1.0.2152254142 → 1.0.2152267785
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ import GirafeHTMLElement from '../../base/GirafeHTMLElement';
|
|
|
4
4
|
import { PreferenceGroups, UserPreference } from './userPreference';
|
|
5
5
|
import { getPropertyByPath, setPropertyByPath } from '../../tools/utils/pathUtils';
|
|
6
6
|
import GirafeColorPicker from '../../tools/utils/girafecolorpicker';
|
|
7
|
-
import { systemIsInDarkMode } from '../../tools/utils/utils';
|
|
7
|
+
import { applyOpacityToLayers, systemIsInDarkMode } from '../../tools/utils/utils';
|
|
8
8
|
/**
|
|
9
9
|
Lets the user override default configuration values and saves them as user data.
|
|
10
10
|
*/
|
|
@@ -35,9 +35,13 @@ export default class UserPreferencesComponent extends GirafeHTMLElement {
|
|
|
35
35
|
const themeId = Object.keys(this.state.themes._allThemes).find((themeKey) => this.state.themes._allThemes[Number(themeKey)].name === themeName);
|
|
36
36
|
return this.state.themes._allThemes[Number(themeId)];
|
|
37
37
|
}),
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
basemap: new UserPreference('basemaps.defaultBasemap', 'activeBasemaps', 'map', 'select', (bsName) => {
|
|
39
|
+
const newDefaultBasemap = Object.values(this.state.basemaps).find((basemap) => basemap.name === bsName);
|
|
40
|
+
if (newDefaultBasemap?.opacity == 0) {
|
|
41
|
+
newDefaultBasemap.opacity = 1;
|
|
42
|
+
applyOpacityToLayers(1, newDefaultBasemap.layersList);
|
|
43
|
+
}
|
|
44
|
+
return [newDefaultBasemap];
|
|
41
45
|
}),
|
|
42
46
|
projection: new UserPreference('map.srid', 'projection', 'map', 'select'),
|
|
43
47
|
darkFrontendMode: new UserPreference('interface.darkFrontendMode', 'interface.darkFrontendMode', 'visual', 'select'),
|
|
@@ -121,7 +125,7 @@ export default class UserPreferencesComponent extends GirafeHTMLElement {
|
|
|
121
125
|
return { label: this.context.configManager.Config.projections[key], value: key };
|
|
122
126
|
});
|
|
123
127
|
this.refreshThemeOptions();
|
|
124
|
-
this.preferences.
|
|
128
|
+
this.preferences.basemap.options = Object.keys(this.state.basemaps).map((key) => {
|
|
125
129
|
const baseMapName = this.state.basemaps[Number(key)].name;
|
|
126
130
|
return { label: baseMapName, value: baseMapName };
|
|
127
131
|
});
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.2152267785", "build":"2152267785", "date":"11/11/2025"}
|