qwc2 2025.10.24 → 2025.10.29
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.
- package/components/FeatureAttributesWindow.js +3 -2
- package/components/NumericInputWindow.js +30 -22
- package/components/map/layers/MVTLayer.js +3 -0
- package/components/map/layers/VectorLayer.js +66 -65
- package/components/map3d/drawtool/EditTool3D.js +1 -1
- package/components/style/NumericInputWindow.css +19 -4
- package/components/widgets/TextInput.js +4 -2
- package/package.json +1 -1
- package/plugins/HeightProfile.js +3 -1
- package/plugins/Redlining.js +7 -1
- package/plugins/map/RedliningSupport.js +279 -219
- package/reducers/redlining.js +5 -3
- package/scripts/updateTranslations.js +1 -1
- package/static/translations/bg-BG.json +3 -3
- package/static/translations/ca-ES.json +3 -3
- package/static/translations/cs-CZ.json +3 -3
- package/static/translations/de-CH.json +3 -3
- package/static/translations/de-DE.json +3 -3
- package/static/translations/en-US.json +3 -3
- package/static/translations/es-ES.json +3 -3
- package/static/translations/fi-FI.json +3 -3
- package/static/translations/fr-FR.json +3 -3
- package/static/translations/hu-HU.json +3 -3
- package/static/translations/it-IT.json +3 -3
- package/static/translations/ja-JP.json +3 -3
- package/static/translations/nl-NL.json +3 -3
- package/static/translations/no-NO.json +3 -3
- package/static/translations/pl-PL.json +3 -3
- package/static/translations/pt-BR.json +3 -3
- package/static/translations/pt-PT.json +3 -3
- package/static/translations/ro-RO.json +3 -3
- package/static/translations/ru-RU.json +3 -3
- package/static/translations/sv-SE.json +3 -3
- package/static/translations/tr-TR.json +3 -3
- package/static/translations/tsconfig.json +3 -3
- package/static/translations/uk-UA.json +3 -3
- package/utils/EditingInterface.js +15 -4
- package/utils/LayerUtils.js +16 -6
|
@@ -136,9 +136,10 @@ var FeatureAttributesWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
136
136
|
return _createClass(FeatureAttributesWindow, [{
|
|
137
137
|
key: "render",
|
|
138
138
|
value: function render() {
|
|
139
|
+
var _this$props$feature;
|
|
139
140
|
var body = null;
|
|
140
|
-
if (
|
|
141
|
-
body = /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("featureattributes.
|
|
141
|
+
if (((_this$props$feature = this.props.feature) === null || _this$props$feature === void 0 ? void 0 : _this$props$feature.type) !== "Feature") {
|
|
142
|
+
body = /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("featureattributes.nofeatureormultiple"));
|
|
142
143
|
} else {
|
|
143
144
|
body = this.renderAttributesList();
|
|
144
145
|
}
|
|
@@ -68,6 +68,7 @@ var NumericInputWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
68
68
|
onChange: function onChange(text) {
|
|
69
69
|
return _this.onValueChanged(text, decimals, _onChange);
|
|
70
70
|
},
|
|
71
|
+
showClear: false,
|
|
71
72
|
value: value
|
|
72
73
|
});
|
|
73
74
|
});
|
|
@@ -79,6 +80,7 @@ var NumericInputWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
79
80
|
onChange: function onChange(text) {
|
|
80
81
|
return _this.onValueChanged(text, decimals, _onChange2);
|
|
81
82
|
},
|
|
83
|
+
showClear: false,
|
|
82
84
|
value: value
|
|
83
85
|
});
|
|
84
86
|
});
|
|
@@ -91,9 +93,9 @@ var NumericInputWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
91
93
|
});
|
|
92
94
|
_defineProperty(_this, "renderPointInputForm", function () {
|
|
93
95
|
var coordinates = _this.state.geometry.coordinates;
|
|
94
|
-
return /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "x
|
|
96
|
+
return /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "x")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(coordinates[0], function (value) {
|
|
95
97
|
return _this.updatePoint(value, 0);
|
|
96
|
-
})), /*#__PURE__*/React.createElement("td", null, "y
|
|
98
|
+
})), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "y")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(coordinates[1], function (value) {
|
|
97
99
|
return _this.updatePoint(value, 1);
|
|
98
100
|
})))));
|
|
99
101
|
});
|
|
@@ -116,27 +118,33 @@ var NumericInputWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
116
118
|
onMouseLeave: function onMouseLeave() {
|
|
117
119
|
return _this.clearListCoordinateHighlight(idx);
|
|
118
120
|
}
|
|
119
|
-
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(
|
|
120
|
-
|
|
121
|
+
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("button", {
|
|
122
|
+
className: "button",
|
|
121
123
|
onClick: function onClick() {
|
|
122
124
|
return _this.insertCoordinate(idx);
|
|
123
125
|
}
|
|
124
|
-
}
|
|
126
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
127
|
+
icon: "plus"
|
|
128
|
+
}))), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "x")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(coordinates[idx][0], function (value) {
|
|
125
129
|
return _this.updateListCoordinate(value, idx, 0);
|
|
126
|
-
})), /*#__PURE__*/React.createElement("td", null, "y
|
|
130
|
+
})), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "y")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(coordinates[idx][1], function (value) {
|
|
127
131
|
return _this.updateListCoordinate(value, idx, 1);
|
|
128
|
-
})), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(
|
|
129
|
-
|
|
132
|
+
})), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("button", {
|
|
133
|
+
className: "button",
|
|
130
134
|
onClick: function onClick() {
|
|
131
135
|
return _this.removeCoordinate(idx);
|
|
132
136
|
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
138
|
+
icon: "trash"
|
|
139
|
+
}))));
|
|
140
|
+
}), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("button", {
|
|
141
|
+
className: "button",
|
|
136
142
|
onClick: function onClick() {
|
|
137
143
|
return _this.insertCoordinate(coordinates.length);
|
|
138
144
|
}
|
|
139
|
-
}
|
|
145
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
146
|
+
icon: "plus"
|
|
147
|
+
}))), /*#__PURE__*/React.createElement("td", {
|
|
140
148
|
colSpan: "5"
|
|
141
149
|
}))));
|
|
142
150
|
});
|
|
@@ -219,11 +227,11 @@ var NumericInputWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
219
227
|
_defineProperty(_this, "renderCircleInputForm", function () {
|
|
220
228
|
var circleParams = _this.state.feature.circleParams;
|
|
221
229
|
var center = CoordinatesUtils.reproject(circleParams.center, _this.props.mapCrs, _this.state.displayCrs);
|
|
222
|
-
return /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "x
|
|
230
|
+
return /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "x")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(center[0], function (value) {
|
|
223
231
|
return _this.updateCircle(value, center[1], circleParams.radius);
|
|
224
|
-
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "y
|
|
232
|
+
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "y")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(center[1], function (value) {
|
|
225
233
|
return _this.updateCircle(center[0], value, circleParams.radius);
|
|
226
|
-
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "r
|
|
234
|
+
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "r")), /*#__PURE__*/React.createElement("td", null, _this.renderMeasureInput(circleParams.radius, function (value) {
|
|
227
235
|
return _this.updateCircle(center[0], center[1], value);
|
|
228
236
|
})))));
|
|
229
237
|
});
|
|
@@ -254,21 +262,21 @@ var NumericInputWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
254
262
|
d2y = Math.abs(coordinates[2][1] - coordinates[1][1]);
|
|
255
263
|
h = Math.sqrt(d2x * d2x + d2y * d2y);
|
|
256
264
|
}
|
|
257
|
-
return /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "x
|
|
265
|
+
return /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "x")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(x, function (value) {
|
|
258
266
|
return _this.updateBox(value, y, w, h, r);
|
|
259
|
-
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "y
|
|
267
|
+
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, "y")), /*#__PURE__*/React.createElement("td", null, _this.renderOrdinateInput(y, function (value) {
|
|
260
268
|
return _this.updateBox(x, value, w, h, r);
|
|
261
269
|
}))), shape === "Box" ? [/*#__PURE__*/React.createElement("tr", {
|
|
262
270
|
key: "w"
|
|
263
|
-
}, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("numericinput.width")
|
|
271
|
+
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("numericinput.width"))), /*#__PURE__*/React.createElement("td", null, _this.renderMeasureInput(w, function (value) {
|
|
264
272
|
return _this.updateBox(x, y, value, h, r);
|
|
265
273
|
}))), /*#__PURE__*/React.createElement("tr", {
|
|
266
274
|
key: "h"
|
|
267
|
-
}, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("numericinput.height")
|
|
275
|
+
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("numericinput.height"))), /*#__PURE__*/React.createElement("td", null, _this.renderMeasureInput(h, function (value) {
|
|
268
276
|
return _this.updateBox(x, y, w, value, r);
|
|
269
|
-
})))] : /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("numericinput.side")
|
|
277
|
+
})))] : /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("numericinput.side"))), /*#__PURE__*/React.createElement("td", null, _this.renderMeasureInput(w, function (value) {
|
|
270
278
|
return _this.updateBox(x, y, value, value, r);
|
|
271
|
-
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("numericinput.angle")
|
|
279
|
+
}))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("numericinput.angle"))), /*#__PURE__*/React.createElement("td", null, _this.renderMeasureInput(r, function (value) {
|
|
272
280
|
return _this.updateBox(x, y, w, h, value);
|
|
273
281
|
}, 1)))));
|
|
274
282
|
});
|
|
@@ -310,7 +318,7 @@ var NumericInputWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
310
318
|
};
|
|
311
319
|
var body = null;
|
|
312
320
|
if (!this.state.geometry) {
|
|
313
|
-
body = /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("numericinput.
|
|
321
|
+
body = /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("numericinput.nofeatureormultiple"));
|
|
314
322
|
} else if (shapeInputForms[this.state.feature.shape]) {
|
|
315
323
|
body = shapeInputForms[this.state.feature.shape]();
|
|
316
324
|
} else {
|
|
@@ -43,6 +43,9 @@ export default {
|
|
|
43
43
|
var layer = createLayer();
|
|
44
44
|
applyStyle(layer, glStyle, styleSource, options.styleOptions).then(function () {
|
|
45
45
|
group.getLayers().push(layer);
|
|
46
|
+
})["catch"](function (e) {
|
|
47
|
+
/* eslint-disable-next-line */
|
|
48
|
+
console.warn("Unable to apply style " + options.style + ": " + String(e));
|
|
46
49
|
});
|
|
47
50
|
});
|
|
48
51
|
})["catch"](function (e) {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
3
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
4
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
5
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
7
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
4
8
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -20,38 +24,37 @@ import ol from 'openlayers';
|
|
|
20
24
|
import FeatureStyles from '../../../utils/FeatureStyles';
|
|
21
25
|
export function createFeatures(options, mapCrs) {
|
|
22
26
|
var format = new ol.format.GeoJSON();
|
|
23
|
-
return (options.features || []).reduce(function (collection,
|
|
24
|
-
var
|
|
27
|
+
return (options.features || []).reduce(function (collection, featureObj) {
|
|
28
|
+
var _ref, _featureObj$crs;
|
|
29
|
+
var feature = format.readFeature(_objectSpread(_objectSpread({}, featureObj), {}, {
|
|
25
30
|
type: "Feature"
|
|
26
31
|
}));
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
return collection.concat(featureObject);
|
|
32
|
+
var featureCrs = (_ref = (_featureObj$crs = featureObj.crs) !== null && _featureObj$crs !== void 0 ? _featureObj$crs : options.projection) !== null && _ref !== void 0 ? _ref : mapCrs;
|
|
33
|
+
if (featureCrs.type === "name") {
|
|
34
|
+
featureCrs = featureCrs.properties.name;
|
|
35
|
+
}
|
|
36
|
+
if (featureCrs !== mapCrs) {
|
|
37
|
+
var _feature$getGeometry;
|
|
38
|
+
(_feature$getGeometry = feature.getGeometry()) === null || _feature$getGeometry === void 0 || _feature$getGeometry.transform(featureCrs, mapCrs);
|
|
39
|
+
}
|
|
40
|
+
var featureStyleName = featureObj.styleName || options.styleName;
|
|
41
|
+
var featureStyleOptions = _objectSpread(_objectSpread({}, options.styleOptions), featureObj.styleOptions);
|
|
42
|
+
feature.set('styleName', featureStyleName);
|
|
43
|
+
feature.set('styleOptions', featureStyleOptions);
|
|
44
|
+
if (featureObj.circleParams) {
|
|
45
|
+
feature.set('circleParams', featureObj.circleParams);
|
|
46
|
+
feature.setGeometry(new ol.geom.Circle(featureObj.circleParams.center, featureObj.circleParams.radius));
|
|
47
|
+
}
|
|
48
|
+
if (featureObj.shape) {
|
|
49
|
+
feature.set('shape', featureObj.shape);
|
|
50
|
+
}
|
|
51
|
+
if (featureObj.measurements) {
|
|
52
|
+
feature.set('measurements', featureObj.measurements);
|
|
53
|
+
}
|
|
54
|
+
if (featureStyleName) {
|
|
55
|
+
feature.setStyle(FeatureStyles[featureStyleName](feature, featureStyleOptions));
|
|
56
|
+
}
|
|
57
|
+
return [].concat(_toConsumableArray(collection), [feature]);
|
|
55
58
|
}, []);
|
|
56
59
|
}
|
|
57
60
|
export function updateFeatures(source, newOptions, oldOptions, mapCrs) {
|
|
@@ -85,60 +88,58 @@ export function updateFeatures(source, newOptions, oldOptions, mapCrs) {
|
|
|
85
88
|
} finally {
|
|
86
89
|
_iterator.f();
|
|
87
90
|
}
|
|
88
|
-
var
|
|
91
|
+
var newFeatures = [];
|
|
89
92
|
var _iterator2 = _createForOfIteratorHelper(newOptions.features),
|
|
90
93
|
_step2;
|
|
91
94
|
try {
|
|
92
|
-
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
96
|
+
var _ref2, _featureObj$crs2;
|
|
97
|
+
var featureObj = _step2.value;
|
|
98
|
+
if (oldFeaturesMap[featureObj.id] && oldFeaturesMap[featureObj.id] === featureObj) {
|
|
95
99
|
// Unchanged, continue
|
|
96
|
-
|
|
100
|
+
continue;
|
|
97
101
|
}
|
|
98
|
-
if (oldFeaturesMap[
|
|
102
|
+
if (oldFeaturesMap[featureObj.id] && oldFeaturesMap[featureObj.id] !== featureObj) {
|
|
99
103
|
// Changed, remove
|
|
100
|
-
var oldFeature = source.getFeatureById(
|
|
104
|
+
var oldFeature = source.getFeatureById(featureObj.id);
|
|
101
105
|
if (oldFeature) {
|
|
102
106
|
source.removeFeature(oldFeature);
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
// Add new
|
|
106
|
-
var
|
|
110
|
+
var _feature = format.readFeature(_objectSpread(_objectSpread({}, featureObj), {}, {
|
|
107
111
|
type: "Feature"
|
|
108
112
|
}));
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
};
|
|
132
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
133
|
-
if (_loop()) continue;
|
|
113
|
+
var featureCrs = (_ref2 = (_featureObj$crs2 = featureObj.crs) !== null && _featureObj$crs2 !== void 0 ? _featureObj$crs2 : newOptions.projection) !== null && _ref2 !== void 0 ? _ref2 : mapCrs;
|
|
114
|
+
if (featureCrs.type === "name") {
|
|
115
|
+
featureCrs = featureCrs.properties.name;
|
|
116
|
+
}
|
|
117
|
+
if (featureCrs !== mapCrs) {
|
|
118
|
+
var _feature$getGeometry2;
|
|
119
|
+
(_feature$getGeometry2 = _feature.getGeometry()) === null || _feature$getGeometry2 === void 0 || _feature$getGeometry2.transform(featureCrs, mapCrs);
|
|
120
|
+
}
|
|
121
|
+
if (featureObj.circleParams) {
|
|
122
|
+
_feature.setGeometry(new ol.geom.Circle(featureObj.circleParams.center, featureObj.circleParams.radius));
|
|
123
|
+
}
|
|
124
|
+
var featureStyleName = featureObj.styleName || newOptions.styleName;
|
|
125
|
+
var featureStyleOptions = _objectSpread(_objectSpread({}, newOptions.styleOptions), featureObj.styleOptions);
|
|
126
|
+
_feature.set('styleName', featureStyleName);
|
|
127
|
+
_feature.set('styleOptions', featureStyleOptions);
|
|
128
|
+
_feature.set('circleParams', featureObj.circleParams);
|
|
129
|
+
_feature.set('shape', featureObj.shape);
|
|
130
|
+
_feature.set('measurements', featureObj.measurements);
|
|
131
|
+
if (featureStyleName) {
|
|
132
|
+
_feature.setStyle(FeatureStyles[featureStyleName](_feature, featureStyleOptions));
|
|
133
|
+
}
|
|
134
|
+
newFeatures.push(_feature);
|
|
134
135
|
}
|
|
135
136
|
} catch (err) {
|
|
136
137
|
_iterator2.e(err);
|
|
137
138
|
} finally {
|
|
138
139
|
_iterator2.f();
|
|
139
140
|
}
|
|
140
|
-
if (
|
|
141
|
-
source.addFeatures(
|
|
141
|
+
if (newFeatures) {
|
|
142
|
+
source.addFeatures(newFeatures);
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
export function featureStyleFunction(options) {
|
|
@@ -552,7 +552,7 @@ var EditTool3D = /*#__PURE__*/function (_React$Component) {
|
|
|
552
552
|
}) : null), this.state.selectCount === 0 ? /*#__PURE__*/React.createElement("div", {
|
|
553
553
|
className: "redlining-message",
|
|
554
554
|
key: "CtrlHint"
|
|
555
|
-
}, LocaleUtils.tr("
|
|
555
|
+
}, LocaleUtils.tr("redlining.ctrlhint")) : null, this.state.selectCount === 1 ? /*#__PURE__*/React.createElement("div", {
|
|
556
556
|
className: "redlining-controlsbar",
|
|
557
557
|
key: "Label"
|
|
558
558
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2,6 +2,10 @@ div.numeric-input-widget-body > table {
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
div.numeric-input-widget-body > table td {
|
|
6
|
+
padding: 1px 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
div.numeric-input-widget-body > table input {
|
|
6
10
|
width: 100%;
|
|
7
11
|
}
|
|
@@ -10,9 +14,20 @@ div.numeric-input-widget-body > table tr:hover {
|
|
|
10
14
|
background-color: var(--list-item-bg-color-hover);
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
div.numeric-input-widget-body > table td:
|
|
14
|
-
div.numeric-input-widget-body > table td:nth-child(2),
|
|
15
|
-
div.numeric-input-widget-body > table td:nth-child(4),
|
|
16
|
-
div.numeric-input-widget-body > table td:nth-child(6) {
|
|
17
|
+
div.numeric-input-widget-body > table td:not(:has(> div.TextInput)) {
|
|
17
18
|
width: 1%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
div.numeric-input-widget-body > table td:not(:has(> div.TextInput)):not(:first-child) {
|
|
22
|
+
padding-left: 2px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
div.numeric-input-widget-body > table td > span {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
width: 100%;
|
|
28
|
+
border: 1px solid var(--border-color);
|
|
29
|
+
border-right-width: 0;
|
|
30
|
+
height: 2em;
|
|
31
|
+
align-items: center;
|
|
32
|
+
padding: 0 0.25em;
|
|
18
33
|
}
|
|
@@ -225,7 +225,7 @@ var TextInput = /*#__PURE__*/function (_React$Component) {
|
|
|
225
225
|
"text-input-readonly": this.props.readOnly || !this.state.curValue,
|
|
226
226
|
"text-input-invalid": this.props.required && !this.state.curValue
|
|
227
227
|
});
|
|
228
|
-
var showClear = this.state.focus && !this.props.multiline && !this.props.disabled && !this.props.readOnly && this.state.curValue;
|
|
228
|
+
var showClear = this.props.showClear && this.state.focus && !this.props.multiline && !this.props.disabled && !this.props.readOnly && this.state.curValue;
|
|
229
229
|
var style = _objectSpread({}, this.props.style);
|
|
230
230
|
if (showClear) {
|
|
231
231
|
style.marginRight = '1.5em';
|
|
@@ -303,11 +303,13 @@ _defineProperty(TextInput, "propTypes", {
|
|
|
303
303
|
placeholder: PropTypes.string,
|
|
304
304
|
readOnly: PropTypes.bool,
|
|
305
305
|
required: PropTypes.bool,
|
|
306
|
+
showClear: PropTypes.bool,
|
|
306
307
|
style: PropTypes.object,
|
|
307
308
|
value: PropTypes.string
|
|
308
309
|
});
|
|
309
310
|
_defineProperty(TextInput, "defaultProps", {
|
|
310
311
|
clearValue: "",
|
|
311
|
-
placeholder: ""
|
|
312
|
+
placeholder: "",
|
|
313
|
+
showClear: true
|
|
312
314
|
});
|
|
313
315
|
export { TextInput as default };
|
package/package.json
CHANGED
package/plugins/HeightProfile.js
CHANGED
|
@@ -109,7 +109,8 @@ var HeightProfilePrintDialog_ = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
109
109
|
fillColor: [255, 255, 255, 1],
|
|
110
110
|
strokeColor: [255, 0, 0, 1],
|
|
111
111
|
strokeWidth: 2,
|
|
112
|
-
circleRadius: 6
|
|
112
|
+
circleRadius: 6,
|
|
113
|
+
strokeDash: []
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
116
|
})), [{
|
|
@@ -121,6 +122,7 @@ var HeightProfilePrintDialog_ = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
121
122
|
styleOptions: {
|
|
122
123
|
strokeColor: [255, 0, 0, 1],
|
|
123
124
|
strokeWidth: 4,
|
|
125
|
+
strokeDash: [],
|
|
124
126
|
headmarker: _this.props.measurement.lineHeadMarker,
|
|
125
127
|
tailmarker: _this.props.measurement.lineTailMarker
|
|
126
128
|
},
|
package/plugins/Redlining.js
CHANGED
|
@@ -343,7 +343,13 @@ var Redlining = /*#__PURE__*/function (_React$Component) {
|
|
|
343
343
|
labelPlaceholder = LocaleUtils.tr("redlining.text");
|
|
344
344
|
}
|
|
345
345
|
if (_this.props.redlining.action !== 'Draw' && !_this.props.redlining.selectedFeature) {
|
|
346
|
-
|
|
346
|
+
if (_this.props.redlining.action === 'Transform') {
|
|
347
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
348
|
+
className: "redlining-message"
|
|
349
|
+
}, LocaleUtils.tr("redlining.ctrlhint"));
|
|
350
|
+
} else {
|
|
351
|
+
return null;
|
|
352
|
+
}
|
|
347
353
|
}
|
|
348
354
|
return /*#__PURE__*/React.createElement("div", {
|
|
349
355
|
className: "redlining-controlsbar"
|