qwc2 2026.8.14 → 2026.8.21

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.
@@ -156,132 +156,144 @@ var BottomBar = /*#__PURE__*/function (_React$Component) {
156
156
  key: "render",
157
157
  value: function render() {
158
158
  var _this2 = this;
159
- if (this.props.fullscreen) {
160
- return null;
161
- }
162
- var leftBottomLinks = (this.props.additionalBottomBarLinks || []).filter(function (entry) {
163
- return entry.side === "left";
164
- }).map(this.renderLink);
165
- var rightBottomLinks = (this.props.additionalBottomBarLinks || []).filter(function (entry) {
166
- return entry.side !== "left";
167
- }).map(this.renderLink);
168
- if (this.props.viewertitleUrl) {
169
- var entry = {
170
- url: this.props.viewertitleUrl,
171
- urlTarget: this.props.viewertitleUrlTarget,
172
- label: LocaleUtils.tr("bottombar.viewertitle_label"),
173
- icon: this.props.viewertitleUrlIcon
174
- };
175
- rightBottomLinks.push(this.renderLink(entry));
176
- }
177
- if (this.props.termsUrl) {
178
- var _entry = {
179
- url: this.props.termsUrl,
180
- urlTarget: this.props.termsUrlTarget,
181
- label: LocaleUtils.tr("bottombar.terms_label"),
182
- icon: this.props.termsUrlIcon
183
- };
184
- rightBottomLinks.push(this.renderLink(_entry));
185
- }
186
- var enabledMouseCrs = [].concat(_toConsumableArray(this.props.additionalMouseCrs || []), [this.props.map.projection, "EPSG:4326"]);
187
- var availableCRS = Object.fromEntries(Object.entries(CoordinatesUtils.getAvailableCRS()).filter(function (_ref) {
188
- var _ref2 = _slicedToArray(_ref, 2),
189
- key = _ref2[0],
190
- value = _ref2[1];
191
- return enabledMouseCrs.includes(key);
192
- }));
193
- var scalebar = null;
159
+ var widgets = [];
194
160
  if (this.props.displayScalebar) {
195
- scalebar = /*#__PURE__*/React.createElement("div", {
161
+ widgets.push(/*#__PURE__*/React.createElement("div", {
196
162
  className: "bottombar-scalebar-container",
163
+ key: "scalebar",
197
164
  ref: this.initScaleBar
198
- });
199
- }
200
- var coordinates = null;
201
- if (this.props.displayCoordinates) {
202
- coordinates = /*#__PURE__*/React.createElement("div", {
203
- className: "controlgroup"
204
- }, /*#__PURE__*/React.createElement("span", {
205
- className: "bottombar-mousepos-label"
206
- }, LocaleUtils.tr("bottombar.mousepos_label"), ":\xA0"), /*#__PURE__*/React.createElement(CoordinateDisplayer, {
207
- className: "bottombar-mousepos",
208
- coordinateFormatter: this.props.coordinateFormatter,
209
- displayCrs: this.props.map.displayCrs,
210
- mapCrs: this.props.map.projection
211
- }), /*#__PURE__*/React.createElement("select", {
212
- onChange: function onChange(ev) {
213
- return _this2.props.setDisplayCrs(ev.target.value);
214
- },
215
- value: this.props.map.displayCrs
216
- }, Object.keys(availableCRS).map(function (crs) {
217
- return /*#__PURE__*/React.createElement("option", {
218
- key: crs,
219
- value: crs
220
- }, availableCRS[crs].label);
221
- })));
222
- }
223
- var scales = null;
224
- if (this.props.displayScales) {
225
- scales = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
226
- className: "bottombar-scales-label"
227
- }, LocaleUtils.tr("bottombar.scale_label"), ":\xA0"), /*#__PURE__*/React.createElement(InputContainer, {
228
- className: "bottombar-scale-combo"
229
- }, /*#__PURE__*/React.createElement("span", {
230
- className: "bottombar-scale-combo-prefix",
231
- role: "prefix"
232
- }, " 1 : "), /*#__PURE__*/React.createElement("select", {
233
- onChange: function onChange(ev) {
234
- return _this2.props.changeZoomLevel(parseInt(ev.target.value, 10));
235
- },
236
- role: "input",
237
- value: Math.round(this.props.map.zoom)
238
- }, this.props.map.scales.map(function (item, index) {
239
- return /*#__PURE__*/React.createElement("option", {
240
- key: index,
241
- value: index
242
- }, LocaleUtils.toLocaleFixed(item, 0));
243
- })), /*#__PURE__*/React.createElement(NumberInput, {
244
- decimals: 0,
245
- hideArrows: true,
246
- onChange: this.setScale,
247
- role: "input",
248
- value: this.state.scale
249
- })));
165
+ }));
250
166
  }
251
- var quickSelectDropdown = null;
252
- if (this.props.displayQuickSelectDropdown && (this.props.bookmarks && this.props.bookmarks.length > 0 || this.props.visibilityPresets && this.props.visibilityPresets.length > 0)) {
253
- var bookmarks = this.filterByActiveTheme(this.props.bookmarks || []);
254
- var visibilityPresets = this.filterByActiveTheme(this.props.visibilityPresets || []);
255
- var options = _defineProperty(_defineProperty({}, LocaleUtils.tr("appmenu.items.Bookmark"), bookmarks.map(function (bm) {
256
- return ["bk:" + bm.key, bm.description];
257
- })), LocaleUtils.tr("appmenu.items.VisibilityPresets"), visibilityPresets.map(function (bm) {
258
- return ["vp:" + bm.key, bm.description];
167
+ if (!this.props.fullscreen) {
168
+ var _this$props$bookmarks, _this$props$visibilit;
169
+ var leftBottomLinks = (this.props.additionalBottomBarLinks || []).filter(function (entry) {
170
+ return entry.side === "left";
171
+ }).map(this.renderLink);
172
+ widgets.push(/*#__PURE__*/React.createElement("span", {
173
+ className: "bottombar-links",
174
+ key: "leftlinks"
175
+ }, leftBottomLinks));
176
+ widgets.push(/*#__PURE__*/React.createElement("span", {
177
+ className: "bottombar-spacer",
178
+ key: "spacer1"
259
179
  }));
260
- quickSelectDropdown = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
261
- className: "bottombar-quick-select-label"
262
- }, LocaleUtils.tr("bottombar.quick_select_label"), ":\xA0"), /*#__PURE__*/React.createElement(GroupSelect, {
263
- onChange: this.openBookmarkOrPreset,
264
- options: options,
265
- placeholder: LocaleUtils.tr("common.select")
180
+ if (this.props.displayCoordinates) {
181
+ var enabledMouseCrs = [].concat(_toConsumableArray(this.props.additionalMouseCrs || []), [this.props.map.projection, "EPSG:4326"]);
182
+ var availableCRS = Object.fromEntries(Object.entries(CoordinatesUtils.getAvailableCRS()).filter(function (_ref) {
183
+ var _ref2 = _slicedToArray(_ref, 2),
184
+ key = _ref2[0],
185
+ value = _ref2[1];
186
+ return enabledMouseCrs.includes(key);
187
+ }));
188
+ widgets.push(/*#__PURE__*/React.createElement("div", {
189
+ className: "controlgroup",
190
+ key: "coordinates"
191
+ }, /*#__PURE__*/React.createElement("span", {
192
+ className: "bottombar-mousepos-label"
193
+ }, LocaleUtils.tr("bottombar.mousepos_label"), ":\xA0"), /*#__PURE__*/React.createElement(CoordinateDisplayer, {
194
+ className: "bottombar-mousepos",
195
+ coordinateFormatter: this.props.coordinateFormatter,
196
+ displayCrs: this.props.map.displayCrs,
197
+ mapCrs: this.props.map.projection
198
+ }), /*#__PURE__*/React.createElement("select", {
199
+ onChange: function onChange(ev) {
200
+ return _this2.props.setDisplayCrs(ev.target.value);
201
+ },
202
+ value: this.props.map.displayCrs
203
+ }, Object.keys(availableCRS).map(function (crs) {
204
+ return /*#__PURE__*/React.createElement("option", {
205
+ key: crs,
206
+ value: crs
207
+ }, availableCRS[crs].label);
208
+ }))));
209
+ }
210
+ if (this.props.displayScales) {
211
+ widgets.push(/*#__PURE__*/React.createElement("div", {
212
+ key: "scales"
213
+ }, /*#__PURE__*/React.createElement("span", {
214
+ className: "bottombar-scales-label"
215
+ }, LocaleUtils.tr("bottombar.scale_label"), ":\xA0"), /*#__PURE__*/React.createElement(InputContainer, {
216
+ className: "bottombar-scale-combo"
217
+ }, /*#__PURE__*/React.createElement("span", {
218
+ className: "bottombar-scale-combo-prefix",
219
+ role: "prefix"
220
+ }, " 1 : "), /*#__PURE__*/React.createElement("select", {
221
+ onChange: function onChange(ev) {
222
+ return _this2.props.changeZoomLevel(parseInt(ev.target.value, 10));
223
+ },
224
+ role: "input",
225
+ value: Math.round(this.props.map.zoom)
226
+ }, this.props.map.scales.map(function (item, index) {
227
+ return /*#__PURE__*/React.createElement("option", {
228
+ key: index,
229
+ value: index
230
+ }, LocaleUtils.toLocaleFixed(item, 0));
231
+ })), /*#__PURE__*/React.createElement(NumberInput, {
232
+ decimals: 0,
233
+ hideArrows: true,
234
+ onChange: this.setScale,
235
+ role: "input",
236
+ value: this.state.scale
237
+ }))));
238
+ }
239
+ if (this.props.displayQuickSelectDropdown && (((_this$props$bookmarks = this.props.bookmarks) === null || _this$props$bookmarks === void 0 ? void 0 : _this$props$bookmarks.length) > 0 || ((_this$props$visibilit = this.props.visibilityPresets) === null || _this$props$visibilit === void 0 ? void 0 : _this$props$visibilit.length) > 0)) {
240
+ var bookmarks = this.filterByActiveTheme(this.props.bookmarks || []);
241
+ var visibilityPresets = this.filterByActiveTheme(this.props.visibilityPresets || []);
242
+ var options = _defineProperty(_defineProperty({}, LocaleUtils.tr("appmenu.items.Bookmark"), bookmarks.map(function (bm) {
243
+ return ["bk:" + bm.key, bm.description];
244
+ })), LocaleUtils.tr("appmenu.items.VisibilityPresets"), visibilityPresets.map(function (bm) {
245
+ return ["vp:" + bm.key, bm.description];
246
+ }));
247
+ widgets.push(/*#__PURE__*/React.createElement("div", {
248
+ key: "quickselect"
249
+ }, /*#__PURE__*/React.createElement("span", {
250
+ className: "bottombar-quick-select-label"
251
+ }, LocaleUtils.tr("bottombar.quick_select_label"), ":\xA0"), /*#__PURE__*/React.createElement(GroupSelect, {
252
+ onChange: this.openBookmarkOrPreset,
253
+ options: options,
254
+ placeholder: LocaleUtils.tr("common.select")
255
+ })));
256
+ }
257
+ var rightBottomLinks = (this.props.additionalBottomBarLinks || []).filter(function (entry) {
258
+ return entry.side !== "left";
259
+ }).map(this.renderLink);
260
+ if (this.props.viewertitleUrl) {
261
+ var entry = {
262
+ url: this.props.viewertitleUrl,
263
+ urlTarget: this.props.viewertitleUrlTarget,
264
+ label: LocaleUtils.tr("bottombar.viewertitle_label"),
265
+ icon: this.props.viewertitleUrlIcon
266
+ };
267
+ rightBottomLinks.push(this.renderLink(entry));
268
+ }
269
+ if (this.props.termsUrl) {
270
+ var _entry = {
271
+ url: this.props.termsUrl,
272
+ urlTarget: this.props.termsUrlTarget,
273
+ label: LocaleUtils.tr("bottombar.terms_label"),
274
+ icon: this.props.termsUrlIcon
275
+ };
276
+ rightBottomLinks.push(this.renderLink(_entry));
277
+ }
278
+ widgets.push(/*#__PURE__*/React.createElement("span", {
279
+ className: "bottombar-spacer",
280
+ key: "spacer2"
266
281
  }));
282
+ widgets.push(/*#__PURE__*/React.createElement("span", {
283
+ className: "bottombar-links",
284
+ key: "rightlinks"
285
+ }, rightBottomLinks));
267
286
  }
268
287
  var style = {
269
288
  marginLeft: this.props.mapMargins.outerLeft + 'px',
270
289
  marginRight: this.props.mapMargins.outerRight + 'px'
271
290
  };
272
291
  return /*#__PURE__*/React.createElement("div", {
292
+ className: this.props.fullscreen ? "bottombar-fullscreen" : "",
273
293
  id: "BottomBar",
274
294
  ref: this.storeHeight,
275
295
  style: style
276
- }, scalebar, /*#__PURE__*/React.createElement("span", {
277
- className: "bottombar-links"
278
- }, leftBottomLinks), /*#__PURE__*/React.createElement("span", {
279
- className: "bottombar-spacer"
280
- }), coordinates, scales, quickSelectDropdown, /*#__PURE__*/React.createElement("span", {
281
- className: "bottombar-spacer"
282
- }), /*#__PURE__*/React.createElement("span", {
283
- className: "bottombar-links"
284
- }, rightBottomLinks));
296
+ }, widgets);
285
297
  }
286
298
  }]);
287
299
  }(React.Component);
@@ -5,13 +5,20 @@
5
5
  bottom: 0;
6
6
  height: 3em;
7
7
  z-index: 100;
8
+ font-size: 75%;
9
+ display: flex;
10
+ align-items: center;
11
+ }
12
+
13
+ #BottomBar:not(.bottombar-fullscreen) {
8
14
  color: var(--panel-text-color);
9
15
  background-color: var(--panel-bg-color);
10
16
  box-shadow: 0 -2px 4px rgba(136, 136, 136, 0.5);
11
17
  backdrop-filter: blur(3px);
12
- font-size: 75%;
13
- display: flex;
14
- align-items: center;
18
+ }
19
+
20
+ #BottomBar.bottombar-fullscreen {
21
+ pointer-events: none;
15
22
  }
16
23
 
17
24
  #BottomBar > * {
@@ -703,8 +703,8 @@ var LayerUtils = {
703
703
  var entry = _step1.value;
704
704
  var _layer2 = entry.layer;
705
705
 
706
- // Attempt to merge with previous if possible
707
- if (((_prevlayer = prevlayer) === null || _prevlayer === void 0 ? void 0 : _prevlayer.srcid) === _layer2.srcid) {
706
+ // Attempt to merge with previous if possible (same srcid when defined)
707
+ if (_layer2 !== null && _layer2 !== void 0 && _layer2.srcid && ((_prevlayer = prevlayer) === null || _prevlayer === void 0 ? void 0 : _prevlayer.srcid) === _layer2.srcid) {
708
708
  if (isEmpty(prevlayer.sublayers)) {
709
709
  prevlayer.sublayers = _layer2.sublayers;
710
710
  } else if (!isEmpty(_layer2.sublayers)) {