@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
- basemaps: new UserPreference('basemaps.defaultBasemap', 'activeBasemaps', 'map', 'select', (bsName) => {
39
- const bsId = Object.keys(this.state.basemaps).find((bsKey) => this.state.basemaps[Number(bsKey)].name === bsName);
40
- return [this.state.basemaps[Number(bsId)]];
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.basemaps.options = Object.keys(this.state.basemaps).map((key) => {
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
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geomapfish.dev"
7
7
  },
8
- "version": "1.0.2152254142",
8
+ "version": "1.0.2152267785",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.0.2152254142", "build":"2152254142", "date":"11/11/2025"}
1
+ {"version":"1.0.2152267785", "build":"2152267785", "date":"11/11/2025"}