qwc2 2025.12.2 → 2025.12.15

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.
Files changed (41) hide show
  1. package/actions/windows.js +2 -0
  2. package/components/Icon.js +9 -2
  3. package/components/IdentifyViewer.js +1 -1
  4. package/components/map3d/MapControls3D.js +7 -9
  5. package/components/map3d/style/MapControls3D.css +7 -2
  6. package/icons/oblique.svg +53 -0
  7. package/package.json +3 -2
  8. package/plugins/Cyclomedia.js +2 -1
  9. package/plugins/MapTip.js +1 -1
  10. package/plugins/ObliqueView.js +410 -0
  11. package/plugins/style/Map.css +4 -2
  12. package/plugins/style/ObliqueView.css +112 -0
  13. package/scripts/themesConfig.js +2 -0
  14. package/scripts/themesConfig.py +3 -0
  15. package/static/translations/bg-BG.json +5 -0
  16. package/static/translations/ca-ES.json +5 -0
  17. package/static/translations/cs-CZ.json +5 -0
  18. package/static/translations/de-CH.json +5 -0
  19. package/static/translations/de-DE.json +5 -0
  20. package/static/translations/en-US.json +5 -0
  21. package/static/translations/es-ES.json +5 -0
  22. package/static/translations/fi-FI.json +5 -0
  23. package/static/translations/fr-FR.json +5 -0
  24. package/static/translations/hu-HU.json +5 -0
  25. package/static/translations/it-IT.json +5 -0
  26. package/static/translations/ja-JP.json +5 -0
  27. package/static/translations/nl-NL.json +5 -0
  28. package/static/translations/no-NO.json +5 -0
  29. package/static/translations/pl-PL.json +5 -0
  30. package/static/translations/pt-BR.json +5 -0
  31. package/static/translations/pt-PT.json +5 -0
  32. package/static/translations/ro-RO.json +5 -0
  33. package/static/translations/ru-RU.json +5 -0
  34. package/static/translations/sv-SE.json +5 -0
  35. package/static/translations/tr-TR.json +5 -0
  36. package/static/translations/tsconfig.json +3 -0
  37. package/static/translations/uk-UA.json +5 -0
  38. package/utils/CoordinatesUtils.js +2 -0
  39. package/utils/EditingInterface.js +11 -2
  40. package/utils/MiscUtils.js +23 -0
  41. package/utils/VectorLayerUtils.js +10 -3
@@ -101,6 +101,29 @@ var MiscUtils = {
101
101
  onEsc();
102
102
  }
103
103
  },
104
+ checkKeyActivatePointerDown: function checkKeyActivatePointerDown(ev) {
105
+ if (ev.code === "Space" || ev.code === "Enter") {
106
+ MiscUtils.killEvent(ev);
107
+ ev.currentTarget.dispatchEvent(new PointerEvent("pointerdown", {
108
+ bubbles: true,
109
+ cancelable: true,
110
+ pointerId: 1,
111
+ pointerType: "mouse",
112
+ view: ev.view
113
+ }));
114
+ ev.currentTarget.addEventListener("keyup", function (ev2) {
115
+ ev2.currentTarget.dispatchEvent(new PointerEvent("pointerup", {
116
+ bubbles: true,
117
+ cancelable: true,
118
+ pointerId: 1,
119
+ pointerType: "mouse",
120
+ view: ev2.view
121
+ }));
122
+ }, {
123
+ once: true
124
+ });
125
+ }
126
+ },
104
127
  blendColors: function blendColors(color1, color2, ratio) {
105
128
  color1 = [parseInt(color1[1] + color1[2], 16), parseInt(color1[3] + color1[4], 16), parseInt(color1[5] + color1[6], 16)];
106
129
  color2 = [parseInt(color2[1] + color2[2], 16), parseInt(color2[3] + color2[4], 16), parseInt(color2[5] + color2[6], 16)];
@@ -19,6 +19,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
21
 
22
+ import cleanCords from '@turf/clean-coords';
22
23
  import geojsonBbox from 'geojson-bounding-box';
23
24
  import isEmpty from 'lodash.isempty';
24
25
  import { getDefaultImageStyle } from 'ol/format/KML';
@@ -74,8 +75,14 @@ var VectorLayerUtils = {
74
75
  })
75
76
  });
76
77
  }
77
- return VectorLayerUtils.simplifyFeature(feature);
78
- }).flat();
78
+ try {
79
+ return VectorLayerUtils.simplifyFeature(feature);
80
+ } catch (e) {
81
+ /* eslint-disable-next-line */
82
+ console.warn("Skipping invalid geometry");
83
+ return null;
84
+ }
85
+ }).filter(Boolean).flat();
79
86
  var _iterator2 = _createForOfIteratorHelper(features),
80
87
  _step2;
81
88
  try {
@@ -180,7 +187,7 @@ var VectorLayerUtils = {
180
187
  }));
181
188
  }).flat();
182
189
  } else if (feature.geometry.type === "Polygon") {
183
- return simplepolygon(feature).features.map(function (feat, idx, features) {
190
+ return simplepolygon(cleanCords(feature)).features.map(function (feat, idx, features) {
184
191
  if (feat.properties.parent >= 0) {
185
192
  features[feat.properties.parent].geometry.coordinates.push(feat.geometry.coordinates[0]);
186
193
  return null;