qwc2 2026.8.2 → 2026.8.5
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/package.json
CHANGED
package/plugins/Panoramax.js
CHANGED
|
@@ -56,9 +56,8 @@ var Panoramax = /*#__PURE__*/function (_React$Component) {
|
|
|
56
56
|
currentTooltip: '',
|
|
57
57
|
viewerInitialized: false
|
|
58
58
|
});
|
|
59
|
-
_defineProperty(_this, "
|
|
59
|
+
_defineProperty(_this, "cleanUp", function () {
|
|
60
60
|
var _this$viewer;
|
|
61
|
-
_this.props.setCurrentTask(null);
|
|
62
61
|
_this.props.removeLayer('panoramax-recordings');
|
|
63
62
|
_this.props.removeLayer('panoramaxselection');
|
|
64
63
|
_this.setState({
|
|
@@ -73,6 +72,9 @@ var Panoramax = /*#__PURE__*/function (_React$Component) {
|
|
|
73
72
|
});
|
|
74
73
|
(_this$viewer = _this.viewer) === null || _this$viewer === void 0 || _this$viewer.select(null, null, true);
|
|
75
74
|
});
|
|
75
|
+
_defineProperty(_this, "onClose", function () {
|
|
76
|
+
_this.props.setCurrentTask(null);
|
|
77
|
+
});
|
|
76
78
|
_defineProperty(_this, "initializeViewer", function () {
|
|
77
79
|
var viewerElement = _this.viewerRef.current;
|
|
78
80
|
if (viewerElement) {
|
|
@@ -199,6 +201,8 @@ var Panoramax = /*#__PURE__*/function (_React$Component) {
|
|
|
199
201
|
this.addRecordingsMVT();
|
|
200
202
|
}
|
|
201
203
|
}
|
|
204
|
+
} else if (prevProps.active && !this.props.active) {
|
|
205
|
+
this.cleanUp();
|
|
202
206
|
} else if (this.state.selectionGeom && this.state.selectionGeom !== prevState.selectionGeom) {
|
|
203
207
|
this.queryPoint(this.state.selectionGeom);
|
|
204
208
|
}
|
|
@@ -87,49 +87,59 @@ var ScratchDrawing = /*#__PURE__*/function (_React$Component) {
|
|
|
87
87
|
_defineProperty(_this, "submitGeometry", function () {
|
|
88
88
|
var _this$props$layers$fi;
|
|
89
89
|
var features = ((_this$props$layers$fi = _this.props.layers.find(function (l) {
|
|
90
|
-
return l.id === _this.
|
|
90
|
+
return l.id === _this.layerId;
|
|
91
91
|
})) === null || _this$props$layers$fi === void 0 ? void 0 : _this$props$layers$fi.features) || [];
|
|
92
|
-
_this.
|
|
92
|
+
if (_this.props.redlining.selectedFeature) {
|
|
93
|
+
features = features.filter(function (f) {
|
|
94
|
+
return f.id !== _this.props.redlining.selectedFeature.id;
|
|
95
|
+
});
|
|
96
|
+
features.push(_this.props.redlining.selectedFeature);
|
|
97
|
+
}
|
|
93
98
|
_this.props.task.data.callback(features, _this.props.projection);
|
|
99
|
+
_this.submitted = true;
|
|
94
100
|
_this.props.setCurrentTask(null);
|
|
95
101
|
});
|
|
96
102
|
_this.submitted = false;
|
|
103
|
+
_this.layerId = null;
|
|
97
104
|
return _this;
|
|
98
105
|
}
|
|
99
106
|
_inherits(ScratchDrawing, _React$Component);
|
|
100
107
|
return _createClass(ScratchDrawing, [{
|
|
101
108
|
key: "componentDidUpdate",
|
|
102
109
|
value: function componentDidUpdate(prevProps) {
|
|
103
|
-
|
|
104
|
-
if (this.props.task.id !== "ScratchDrawing" && prevProps.task.id === "ScratchDrawing") {
|
|
105
|
-
if (!this.submitted) {
|
|
106
|
-
prevProps.task.data.callback(null, null);
|
|
107
|
-
this.submitted = true;
|
|
108
|
-
}
|
|
109
|
-
this.props.removeLayer(prevProps.redlining.layer);
|
|
110
|
-
this.props.resetRedliningState();
|
|
111
|
-
}
|
|
112
|
-
// Setup redlining state
|
|
113
|
-
if (this.props.task !== prevProps.task && this.props.task.id === "ScratchDrawing") {
|
|
114
|
-
if (prevProps.task.id === "ScratchDrawing") {
|
|
115
|
-
this.props.removeLayer(prevProps.redlining.layer);
|
|
116
|
-
if (!this.submitted) {
|
|
117
|
-
prevProps.task.data.callback(null, null);
|
|
118
|
-
this.submitted = true;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
this.submitted = false;
|
|
110
|
+
if (this.props.task.id === "ScratchDrawing" && prevProps.task.id !== "ScratchDrawing") {
|
|
122
111
|
var data = this.props.task.data;
|
|
123
|
-
|
|
112
|
+
this.layerId = this.createDrawLayer(data);
|
|
124
113
|
this.props.setSnappingConfig(data.snapping, data.snappingActive);
|
|
125
114
|
this.props.changeRedliningState({
|
|
126
115
|
action: 'PickDraw',
|
|
127
116
|
geomType: data.geomType,
|
|
128
|
-
layer: layerId,
|
|
117
|
+
layer: this.layerId,
|
|
129
118
|
layerTitle: null,
|
|
130
119
|
drawMultiple: data.drawMultiple,
|
|
131
120
|
style: this.drawingStyle(data.style)
|
|
132
121
|
});
|
|
122
|
+
} else if (prevProps.task.id === "ScratchDrawing" && this.props.task !== prevProps.task) {
|
|
123
|
+
this.props.resetRedliningState();
|
|
124
|
+
if (!this.submitted) {
|
|
125
|
+
prevProps.task.data.callback(null, null);
|
|
126
|
+
}
|
|
127
|
+
this.submitted = false;
|
|
128
|
+
} else if (this.props.redlining.layer === null && prevProps.redlining.layer === this.layerId) {
|
|
129
|
+
this.props.removeLayer(this.layerId);
|
|
130
|
+
if (this.props.task.id === "ScratchDrawing") {
|
|
131
|
+
var _data = this.props.task.data;
|
|
132
|
+
this.layerId = this.createDrawLayer(_data);
|
|
133
|
+
this.props.setSnappingConfig(_data.snapping, _data.snappingActive);
|
|
134
|
+
this.props.changeRedliningState({
|
|
135
|
+
action: 'PickDraw',
|
|
136
|
+
geomType: _data.geomType,
|
|
137
|
+
layer: this.layerId,
|
|
138
|
+
layerTitle: null,
|
|
139
|
+
drawMultiple: _data.drawMultiple,
|
|
140
|
+
style: this.drawingStyle(_data.style)
|
|
141
|
+
});
|
|
142
|
+
}
|
|
133
143
|
}
|
|
134
144
|
}
|
|
135
145
|
}, {
|
|
@@ -60,6 +60,7 @@ var OverviewMap3D = /*#__PURE__*/function (_React$Component) {
|
|
|
60
60
|
return _createClass(OverviewMap3D, [{
|
|
61
61
|
key: "componentDidMount",
|
|
62
62
|
value: function componentDidMount() {
|
|
63
|
+
this.updateViewCone();
|
|
63
64
|
this.props.sceneContext.eventDispatcher.addEventListener('cameraChanged', this.updateViewCone);
|
|
64
65
|
}
|
|
65
66
|
}, {
|
package/utils/SearchProviders.js
CHANGED
|
@@ -457,11 +457,15 @@ export var FulltextSearch = /*#__PURE__*/function () {
|
|
|
457
457
|
items: data.results.filter(function (entry) {
|
|
458
458
|
return entry.feature && entry.feature.bbox;
|
|
459
459
|
}).map(function (entry) {
|
|
460
|
+
var center = entry.feature.center;
|
|
461
|
+
if (!center) {
|
|
462
|
+
center = [0.5 * (entry.feature.bbox[0] + entry.feature.bbox[2]), 0.5 * (entry.feature.bbox[1] + entry.feature.bbox[3])];
|
|
463
|
+
}
|
|
460
464
|
return {
|
|
461
465
|
id: entry.feature.feature_id,
|
|
462
466
|
text: entry.feature.display,
|
|
463
|
-
x:
|
|
464
|
-
y:
|
|
467
|
+
x: center[0],
|
|
468
|
+
y: center[1],
|
|
465
469
|
crs: entry.feature.srid ? "EPSG:" + String(entry.feature.srid).replace(/^EPSG:/, '') : null,
|
|
466
470
|
bbox: entry.feature.bbox,
|
|
467
471
|
thumbnail: iconPath + entry.feature.dataproduct_id + ".svg",
|