qwc2 2025.12.18 → 2025.12.24
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/actions/display.js +6 -6
- package/actions/theme.js +4 -19
- package/components/AppMenu.js +1 -1
- package/components/AttributeForm.js +7 -7
- package/components/AttributeTableWidget.js +2 -2
- package/components/AutoEditForm.js +6 -3
- package/components/EditComboField.js +1 -4
- package/components/IdentifyViewer.js +33 -34
- package/components/ImportLayer.js +78 -79
- package/components/OverviewMapButton.js +147 -0
- package/components/PluginsContainer.js +2 -2
- package/components/ResizeableWindow.js +8 -1
- package/components/SearchBox.js +2 -2
- package/components/SideBar.js +1 -0
- package/components/StandardApp.js +1 -2
- package/components/ThemeLayersListWindow.js +10 -1
- package/components/{map3d/View3DSwitcher.js → ViewSwitcher.js} +74 -29
- package/components/map/OlMap.js +1 -1
- package/components/map3d/Map3D.js +50 -48
- package/components/map3d/MapControls3D.js +4 -1
- package/components/map3d/drawtool/EditTool3D.js +1 -1
- package/components/map3d/layers/WFSLayer3D.js +1 -1
- package/components/share/ShareQRCode.js +1 -1
- package/{plugins/map3d/style/OverviewMap3D.css → components/style/OverviewMapButton.css} +4 -4
- package/components/style/ViewSwitcher.css +36 -0
- package/components/widgets/ColorButton.js +2 -2
- package/components/widgets/CopyButton.js +1 -1
- package/components/widgets/LayerCatalogWidget.js +4 -4
- package/libs/openlayers.js +11 -11
- package/package.json +54 -55
- package/plugins/API.js +4 -4
- package/plugins/FeatureForm.js +2 -2
- package/plugins/FeatureSearch.js +12 -12
- package/plugins/GeometryDigitizer.js +12 -13
- package/plugins/Map.js +11 -4
- package/plugins/MapFilter.js +12 -12
- package/plugins/MapTip.js +1 -1
- package/plugins/ObliqueView.js +115 -51
- package/plugins/Print.js +79 -91
- package/plugins/Routing.js +1 -1
- package/plugins/Share.js +5 -5
- package/plugins/TimeManager.js +1 -2
- package/plugins/View3D.js +135 -123
- package/plugins/map/RedliningSupport.js +3 -3
- package/plugins/map3d/Draw3D.js +4 -4
- package/plugins/map3d/ExportObjects3D.js +1 -1
- package/plugins/map3d/HideObjects3D.js +7 -7
- package/plugins/map3d/Identify3D.js +1 -1
- package/plugins/map3d/LayerTree3D.js +1 -1
- package/plugins/map3d/MapExport3D.js +25 -25
- package/plugins/map3d/Measure3D.js +1 -1
- package/plugins/map3d/OverviewMap3D.js +27 -102
- package/plugins/map3d/TopBar3D.js +7 -7
- package/plugins/style/ObliqueView.css +27 -11
- package/reducers/display.js +2 -2
- package/reducers/layers.js +11 -11
- package/scripts/gen-plugin-docs.js +11 -4
- package/scripts/makeIconkit.js +2 -2
- package/scripts/themesConfig.js +5 -5
- package/scripts/updateTranslations.js +2 -2
- package/utils/CoordinatesUtils.js +1 -1
- package/utils/EditingUtils.js +6 -6
- package/utils/FeatureStyles.js +1 -1
- package/utils/LayerUtils.js +73 -74
- package/utils/MiscUtils.js +10 -3
- package/utils/PermaLinkUtils.js +68 -71
- package/utils/SearchProviders.js +2 -2
- package/utils/ServiceLayerUtils.js +12 -12
- package/utils/ThemeUtils.js +1 -1
- package/utils/VectorLayerUtils.js +3 -3
- package/components/map3d/style/View3DSwitcher.css +0 -19
package/plugins/View3D.js
CHANGED
|
@@ -27,7 +27,7 @@ import { connect, Provider } from 'react-redux';
|
|
|
27
27
|
import isEmpty from 'lodash.isempty';
|
|
28
28
|
import PropTypes from 'prop-types';
|
|
29
29
|
import * as displayExports from '../actions/display';
|
|
30
|
-
import {
|
|
30
|
+
import { setViewMode, ViewMode } from '../actions/display';
|
|
31
31
|
import * as layersExports from '../actions/layers';
|
|
32
32
|
import { LayerRole, addLayerFeatures, removeLayer } from '../actions/layers';
|
|
33
33
|
import { panTo, zoomToPoint } from '../actions/map';
|
|
@@ -36,7 +36,6 @@ import * as themeExports from '../actions/theme';
|
|
|
36
36
|
import PluginsContainer from '../components/PluginsContainer';
|
|
37
37
|
import ResizeableWindow from '../components/ResizeableWindow';
|
|
38
38
|
import StandardApp from '../components/StandardApp';
|
|
39
|
-
import View3DSwitcher from '../components/map3d/View3DSwitcher';
|
|
40
39
|
import Spinner from '../components/widgets/Spinner';
|
|
41
40
|
import ReducerIndex from '../reducers/index';
|
|
42
41
|
import personIcon from '../resources/person.png';
|
|
@@ -57,83 +56,24 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
57
56
|
var _this;
|
|
58
57
|
_classCallCheck(this, View3D);
|
|
59
58
|
_this = _callSuper(this, View3D, [props]);
|
|
59
|
+
_defineProperty(_this, "EnabledState", {
|
|
60
|
+
DISABLED: 0,
|
|
61
|
+
ENABLED: 1,
|
|
62
|
+
DISABLING: 2
|
|
63
|
+
});
|
|
60
64
|
_defineProperty(_this, "state", {
|
|
61
65
|
componentLoaded: false,
|
|
62
66
|
windowDetached: false,
|
|
63
67
|
viewsLocked: false,
|
|
64
|
-
storedState: null
|
|
65
|
-
|
|
66
|
-
_defineProperty(_this, "render3DWindow", function () {
|
|
67
|
-
if (_this.props.view3dMode > View3DMode.DISABLED) {
|
|
68
|
-
var extraControls = [{
|
|
69
|
-
icon: "sync",
|
|
70
|
-
callback: _this.sync2DExtent,
|
|
71
|
-
title: LocaleUtils.tr("common.sync2dview")
|
|
72
|
-
}, {
|
|
73
|
-
icon: "lock",
|
|
74
|
-
callback: _this.setLockViews,
|
|
75
|
-
title: LocaleUtils.tr("common.lock2dview"),
|
|
76
|
-
active: _this.state.viewsLocked
|
|
77
|
-
}];
|
|
78
|
-
if (!_this.state.windowDetached) {
|
|
79
|
-
extraControls.push({
|
|
80
|
-
icon: "maximize",
|
|
81
|
-
callback: function callback() {
|
|
82
|
-
return _this.props.setView3dMode(View3DMode.FULLSCREEN);
|
|
83
|
-
},
|
|
84
|
-
title: LocaleUtils.tr("window.maximize")
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
var Map3D = _this.map3dComponent;
|
|
88
|
-
var device = ConfigUtils.isMobile() ? 'mobile' : 'desktop';
|
|
89
|
-
var pluginsConfig = _this.props.view3dMode === View3DMode.FULLSCREEN ? _this.props.localConfig.plugins[device].filter(function (entry) {
|
|
90
|
-
return entry.availableIn3D;
|
|
91
|
-
}) : [];
|
|
92
|
-
return /*#__PURE__*/React.createElement(ResizeableWindow, {
|
|
93
|
-
extraControls: extraControls,
|
|
94
|
-
fullscreen: _this.props.view3dMode === View3DMode.FULLSCREEN,
|
|
95
|
-
icon: "map3d",
|
|
96
|
-
initialHeight: _this.props.geometry.initialHeight,
|
|
97
|
-
initialWidth: _this.props.geometry.initialWidth,
|
|
98
|
-
initialX: _this.props.geometry.initialX,
|
|
99
|
-
initialY: _this.props.geometry.initialY,
|
|
100
|
-
initiallyDocked: _this.props.geometry.initiallyDocked,
|
|
101
|
-
key: "View3DWindow",
|
|
102
|
-
maximizeable: false,
|
|
103
|
-
onClose: _this.onClose,
|
|
104
|
-
onExternalWindowResized: _this.redrawScene,
|
|
105
|
-
onFocusChanged: _this.windowFocusChanged,
|
|
106
|
-
onGeometryChanged: _this.onGeometryChanged,
|
|
107
|
-
splitScreenWhenDocked: true,
|
|
108
|
-
splitTopAndBottomBar: true,
|
|
109
|
-
title: LocaleUtils.tr("map3d.title")
|
|
110
|
-
}, _this.state.componentLoaded ? /*#__PURE__*/React.createElement(Provider, {
|
|
111
|
-
store: _this.store
|
|
112
|
-
}, /*#__PURE__*/React.createElement(PluginsContainer, {
|
|
113
|
-
pluginsConfig: pluginsConfig
|
|
114
|
-
}, /*#__PURE__*/React.createElement(Map3D, {
|
|
115
|
-
controlsPosition: _this.props.controlsPosition,
|
|
116
|
-
defaultSceneQuality: _this.props.defaultSceneQuality,
|
|
117
|
-
innerRef: _this.setRef,
|
|
118
|
-
mouseButtons: _this.props.mouseButtons,
|
|
119
|
-
onCameraChanged: _this.onCameraChanged,
|
|
120
|
-
onMapInitialized: _this.setupMap,
|
|
121
|
-
pluginOptions: _this.props.pluginOptions,
|
|
122
|
-
plugins3d: _this.props.plugins3d,
|
|
123
|
-
searchProviders: _this.props.searchProviders,
|
|
124
|
-
theme: _this.props.theme
|
|
125
|
-
}), _this.props.view3dMode === View3DMode.DISABLING ? /*#__PURE__*/React.createElement("div", {
|
|
126
|
-
className: "view3d-busy-overlay"
|
|
127
|
-
}, /*#__PURE__*/React.createElement(Spinner, null), /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("view3d.storingstate"))) : null)) : null);
|
|
128
|
-
}
|
|
129
|
-
return null;
|
|
68
|
+
storedState: null,
|
|
69
|
+
enabledState: _this.EnabledState.DISABLED
|
|
130
70
|
});
|
|
131
71
|
_defineProperty(_this, "onClose", function () {
|
|
132
|
-
_this.props.
|
|
72
|
+
_this.props.setViewMode(ViewMode._2D);
|
|
133
73
|
});
|
|
134
74
|
_defineProperty(_this, "onGeometryChanged", function (geometry) {
|
|
135
|
-
if (geometry.maximized && _this.props.
|
|
136
|
-
_this.props.
|
|
75
|
+
if (geometry.maximized && _this.props.viewMode !== ViewMode._3DFullscreen) {
|
|
76
|
+
_this.props.setViewMode(ViewMode._3DFullscreen);
|
|
137
77
|
}
|
|
138
78
|
_this.setState({
|
|
139
79
|
windowDetached: geometry.detached
|
|
@@ -230,7 +170,8 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
230
170
|
_this.map3dComponent = null;
|
|
231
171
|
_this.map3dComponentRef = null;
|
|
232
172
|
_this.focusedMap = null;
|
|
233
|
-
_this.firstPersonMarker =
|
|
173
|
+
_this.firstPersonMarker = false;
|
|
174
|
+
_this.pendingViewState = null;
|
|
234
175
|
// Subset of 2d reducers
|
|
235
176
|
var _ReducerIndex$reducer = ReducerIndex.reducers,
|
|
236
177
|
processNotifications = _ReducerIndex$reducer.processNotifications,
|
|
@@ -303,9 +244,9 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
303
244
|
key: "componentDidMount",
|
|
304
245
|
value: function componentDidMount() {
|
|
305
246
|
if (this.props.startupParams.v === "3d") {
|
|
306
|
-
this.props.
|
|
247
|
+
this.props.setViewMode(ViewMode._3DFullscreen);
|
|
307
248
|
} else if (this.props.startupParams.v === "3d2d") {
|
|
308
|
-
this.props.
|
|
249
|
+
this.props.setViewMode(ViewMode._3DSplitscreen);
|
|
309
250
|
}
|
|
310
251
|
window.addEventListener('focus', this.trackFocus, true);
|
|
311
252
|
this.syncParentStore({});
|
|
@@ -318,9 +259,33 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
318
259
|
}, {
|
|
319
260
|
key: "componentDidUpdate",
|
|
320
261
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
321
|
-
var
|
|
322
|
-
|
|
323
|
-
|
|
262
|
+
var _this$props$theme$cur,
|
|
263
|
+
_this2 = this,
|
|
264
|
+
_this$props$theme$cur2;
|
|
265
|
+
var is3DViewMode = function is3DViewMode(viewMode) {
|
|
266
|
+
return [ViewMode._3DFullscreen, ViewMode._3DSplitscreen].includes(viewMode);
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
// Honour theme startupView on theme change unless first loaded theme and startupParams.v is set
|
|
270
|
+
if (this.props.theme.current !== prevProps.theme.current && (_this$props$theme$cur = this.props.theme.current) !== null && _this$props$theme$cur !== void 0 && _this$props$theme$cur.startupView && (prevProps.theme.current !== null || !this.props.startupParams.v)) {
|
|
271
|
+
if (this.props.theme.current.startupView === "3d2d") {
|
|
272
|
+
this.props.setViewMode(ViewMode._3DSplitscreen);
|
|
273
|
+
} else if (this.props.theme.current.startupView === "3d") {
|
|
274
|
+
this.props.setViewMode(ViewMode._3DFullscreen);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if (this.state.enabledState === this.EnabledState.DISABLING && this.props.viewMode !== prevProps.viewMode) {
|
|
278
|
+
this.pendingViewState = [ViewMode._3DFullscreen, ViewMode._3DSplitscreen].includes(this.props.viewMode) ? this.EnabledState.ENABLED : this.EnabledState.DISABLED;
|
|
279
|
+
} else if (is3DViewMode(this.props.viewMode) && !is3DViewMode(prevProps.viewMode)) {
|
|
280
|
+
this.setState({
|
|
281
|
+
enabledState: this.EnabledState.ENABLED
|
|
282
|
+
});
|
|
283
|
+
} else if (!is3DViewMode(this.props.viewMode) && is3DViewMode(prevProps.viewMode)) {
|
|
284
|
+
this.setState({
|
|
285
|
+
enabledState: this.EnabledState.DISABLING
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
if (this.state.enabledState !== this.EnabledState.DISABLED && prevState.enabledState === this.EnabledState.DISABLED) {
|
|
324
289
|
import('../components/map3d/Map3D').then(function (component) {
|
|
325
290
|
_this2.map3dComponent = component["default"];
|
|
326
291
|
_this2.map3dComponentRef = null;
|
|
@@ -329,26 +294,30 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
329
294
|
});
|
|
330
295
|
});
|
|
331
296
|
this.syncParentStore(this.props, true);
|
|
332
|
-
} else if (this.
|
|
297
|
+
} else if (this.state.enabledState === this.EnabledState.DISABLING && prevState.enabledState !== this.EnabledState.DISABLING) {
|
|
333
298
|
if (this.map3dComponentRef) {
|
|
334
299
|
this.map3dComponentRef.store3dState().then(function (storedState) {
|
|
335
300
|
_this2.setState({
|
|
336
|
-
storedState: storedState
|
|
301
|
+
storedState: storedState,
|
|
302
|
+
enabledState: _this2.EnabledState.DISABLED
|
|
303
|
+
}, function () {
|
|
304
|
+
if (_this2.pendingViewState !== null) {
|
|
305
|
+
_this2.setState({
|
|
306
|
+
enabledState: _this2.pendingViewState
|
|
307
|
+
});
|
|
308
|
+
}
|
|
337
309
|
});
|
|
338
|
-
UrlParams.updateParams({
|
|
339
|
-
v3d: undefined,
|
|
340
|
-
bl3d: undefined
|
|
341
|
-
});
|
|
342
|
-
_this2.props.setView3dMode(View3DMode.DISABLED);
|
|
343
310
|
});
|
|
344
311
|
} else {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
bl3d: undefined
|
|
312
|
+
this.setState({
|
|
313
|
+
enabledState: this.EnabledState.DISABLED
|
|
348
314
|
});
|
|
349
|
-
this.props.setView3dMode(View3DMode.DISABLED);
|
|
350
315
|
}
|
|
351
|
-
} else if (this.
|
|
316
|
+
} else if (this.state.enabledState === this.EnabledState.DISABLED && prevState.enabledState !== this.EnabledState.DISABLED) {
|
|
317
|
+
UrlParams.updateParams({
|
|
318
|
+
v3d: undefined,
|
|
319
|
+
bl3d: undefined
|
|
320
|
+
});
|
|
352
321
|
this.map3dComponent = null;
|
|
353
322
|
this.map3dComponentRef = null;
|
|
354
323
|
this.setState({
|
|
@@ -361,28 +330,16 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
361
330
|
}
|
|
362
331
|
// Sync parts of parent store
|
|
363
332
|
this.syncParentStore(prevProps);
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
this.setState({
|
|
371
|
-
viewsLocked: false
|
|
372
|
-
});
|
|
373
|
-
} else if (this.props.view3dMode === View3DMode.SPLITSCREEN) {
|
|
374
|
-
UrlParams.updateParams({
|
|
375
|
-
v: "3d2d"
|
|
376
|
-
});
|
|
377
|
-
} else {
|
|
378
|
-
UrlParams.updateParams({
|
|
379
|
-
v: "2d"
|
|
380
|
-
});
|
|
381
|
-
}
|
|
333
|
+
|
|
334
|
+
// Unlock views when switching to fullscreen 3D mode
|
|
335
|
+
if (this.props.viewMode !== prevProps.viewMode && this.props.viewMode === ViewMode._3DFullscreen) {
|
|
336
|
+
this.setState({
|
|
337
|
+
viewsLocked: false
|
|
338
|
+
});
|
|
382
339
|
}
|
|
383
340
|
// Switch to 2D mode if new theme has no 3D configuration
|
|
384
|
-
if (this.props.theme.current !== prevProps.theme.current && !((_this$props$theme$
|
|
385
|
-
this.props.
|
|
341
|
+
if (this.props.theme.current !== prevProps.theme.current && !((_this$props$theme$cur2 = this.props.theme.current) !== null && _this$props$theme$cur2 !== void 0 && _this$props$theme$cur2.map3d) && this.props.viewMode !== ViewMode._2D) {
|
|
342
|
+
this.props.setViewMode(ViewMode._2D);
|
|
386
343
|
}
|
|
387
344
|
// Lock views
|
|
388
345
|
if (this.state.viewsLocked && this.props.map.bbox !== prevProps.map.bbox && this.focusedMap === "map") {
|
|
@@ -399,7 +356,7 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
399
356
|
key: "syncParentStore",
|
|
400
357
|
value: function syncParentStore(prevProps) {
|
|
401
358
|
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
402
|
-
if (this.
|
|
359
|
+
if (this.state.enabledState !== this.EnabledState.ENABLED) {
|
|
403
360
|
return;
|
|
404
361
|
}
|
|
405
362
|
if (this.props.display !== prevProps.display || force) {
|
|
@@ -436,19 +393,75 @@ var View3D = /*#__PURE__*/function (_React$Component) {
|
|
|
436
393
|
}, {
|
|
437
394
|
key: "render",
|
|
438
395
|
value: function render() {
|
|
439
|
-
var
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
396
|
+
var _this3 = this;
|
|
397
|
+
if (this.state.enabledState > this.EnabledState.DISABLED) {
|
|
398
|
+
var extraControls = [{
|
|
399
|
+
icon: "sync",
|
|
400
|
+
callback: this.sync2DExtent,
|
|
401
|
+
title: LocaleUtils.tr("common.sync2dview")
|
|
402
|
+
}, {
|
|
403
|
+
icon: "lock",
|
|
404
|
+
callback: this.setLockViews,
|
|
405
|
+
title: LocaleUtils.tr("common.lock2dview"),
|
|
406
|
+
active: this.state.viewsLocked
|
|
407
|
+
}];
|
|
408
|
+
if (!this.state.windowDetached) {
|
|
409
|
+
extraControls.push({
|
|
410
|
+
icon: "maximize",
|
|
411
|
+
callback: function callback() {
|
|
412
|
+
return _this3.props.setViewMode(ViewMode._3DFullscreen);
|
|
413
|
+
},
|
|
414
|
+
title: LocaleUtils.tr("window.maximize")
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
var Map3D = this.map3dComponent;
|
|
418
|
+
var device = ConfigUtils.isMobile() ? 'mobile' : 'desktop';
|
|
419
|
+
var pluginsConfig = this.props.viewMode === ViewMode._3DFullscreen ? this.props.localConfig.plugins[device].filter(function (entry) {
|
|
420
|
+
return entry.availableIn3D;
|
|
421
|
+
}) : [];
|
|
422
|
+
return /*#__PURE__*/React.createElement(ResizeableWindow, {
|
|
423
|
+
extraControls: extraControls,
|
|
424
|
+
fullscreen: this.props.viewMode === ViewMode._3DFullscreen,
|
|
425
|
+
icon: "map3d",
|
|
426
|
+
initialHeight: this.props.geometry.initialHeight,
|
|
427
|
+
initialWidth: this.props.geometry.initialWidth,
|
|
428
|
+
initialX: this.props.geometry.initialX,
|
|
429
|
+
initialY: this.props.geometry.initialY,
|
|
430
|
+
initiallyDocked: this.props.geometry.initiallyDocked,
|
|
431
|
+
key: "View3DWindow",
|
|
432
|
+
maximizeable: false,
|
|
433
|
+
onClose: this.onClose,
|
|
434
|
+
onExternalWindowResized: this.redrawScene,
|
|
435
|
+
onFocusChanged: this.windowFocusChanged,
|
|
436
|
+
onGeometryChanged: this.onGeometryChanged,
|
|
437
|
+
splitScreenWhenDocked: true,
|
|
438
|
+
splitTopAndBottomBar: true,
|
|
439
|
+
title: LocaleUtils.tr("map3d.title")
|
|
440
|
+
}, this.state.componentLoaded ? /*#__PURE__*/React.createElement(Provider, {
|
|
441
|
+
store: this.store
|
|
442
|
+
}, /*#__PURE__*/React.createElement(PluginsContainer, {
|
|
443
|
+
pluginsConfig: pluginsConfig
|
|
444
|
+
}, /*#__PURE__*/React.createElement(Map3D, {
|
|
445
|
+
controlsPosition: this.props.controlsPosition,
|
|
446
|
+
defaultSceneQuality: this.props.defaultSceneQuality,
|
|
447
|
+
innerRef: this.setRef,
|
|
448
|
+
mouseButtons: this.props.mouseButtons,
|
|
449
|
+
onCameraChanged: this.onCameraChanged,
|
|
450
|
+
onMapInitialized: this.setupMap,
|
|
451
|
+
pluginOptions: this.props.pluginOptions,
|
|
452
|
+
plugins3d: this.props.plugins3d,
|
|
453
|
+
searchProviders: this.props.searchProviders,
|
|
454
|
+
theme: this.props.theme
|
|
455
|
+
}), this.state.enabledState === this.EnabledState.DISABLING ? /*#__PURE__*/React.createElement("div", {
|
|
456
|
+
className: "view3d-busy-overlay"
|
|
457
|
+
}, /*#__PURE__*/React.createElement(Spinner, null), /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("view3d.storingstate"))) : null)) : null);
|
|
458
|
+
}
|
|
459
|
+
return null;
|
|
445
460
|
}
|
|
446
461
|
}]);
|
|
447
462
|
}(React.Component);
|
|
448
463
|
_defineProperty(View3D, "propTypes", {
|
|
449
464
|
addLayerFeatures: PropTypes.func,
|
|
450
|
-
/** The position slot index of the 3d switch map button, from the bottom (0: bottom slot). */
|
|
451
|
-
buttonPosition: PropTypes.number,
|
|
452
465
|
/** The position of the navigation controls. Either `top` or `bottom`. */
|
|
453
466
|
controlsPosition: PropTypes.string,
|
|
454
467
|
/** The default scene quality factor (`20`: min, `100`: max). */
|
|
@@ -478,15 +491,14 @@ _defineProperty(View3D, "propTypes", {
|
|
|
478
491
|
plugins3d: PropTypes.object,
|
|
479
492
|
removeLayer: PropTypes.func,
|
|
480
493
|
searchProviders: PropTypes.object,
|
|
481
|
-
|
|
494
|
+
setViewMode: PropTypes.func,
|
|
482
495
|
startupParams: PropTypes.object,
|
|
483
496
|
startupState: PropTypes.object,
|
|
484
497
|
theme: PropTypes.object,
|
|
485
|
-
|
|
498
|
+
viewMode: PropTypes.number,
|
|
486
499
|
zoomToPoint: PropTypes.func
|
|
487
500
|
});
|
|
488
501
|
_defineProperty(View3D, "defaultProps", {
|
|
489
|
-
buttonPosition: 6,
|
|
490
502
|
controlsPosition: 'top',
|
|
491
503
|
defaultSceneQuality: 100,
|
|
492
504
|
geometry: {
|
|
@@ -512,7 +524,7 @@ export default (function (plugins3d) {
|
|
|
512
524
|
layers: state.layers,
|
|
513
525
|
theme: state.theme,
|
|
514
526
|
localConfig: state.localConfig,
|
|
515
|
-
|
|
527
|
+
viewMode: state.display.viewMode,
|
|
516
528
|
startupParams: state.localConfig.startupParams,
|
|
517
529
|
startupState: state.localConfig.startupState
|
|
518
530
|
};
|
|
@@ -521,6 +533,6 @@ export default (function (plugins3d) {
|
|
|
521
533
|
removeLayer: removeLayer,
|
|
522
534
|
panTo: panTo,
|
|
523
535
|
zoomToPoint: zoomToPoint,
|
|
524
|
-
|
|
536
|
+
setViewMode: setViewMode
|
|
525
537
|
})(View3D);
|
|
526
538
|
});
|
|
@@ -40,8 +40,8 @@ import { LayerRole, addLayerFeatures, removeLayerFeatures } from '../../actions/
|
|
|
40
40
|
import { changeRedliningState } from '../../actions/redlining';
|
|
41
41
|
import FeatureAttributesWindow from '../../components/FeatureAttributesWindow';
|
|
42
42
|
import LocationRecorder from '../../components/LocationRecorder';
|
|
43
|
-
import NumericInputWindow from '../../components/NumericInputWindow';
|
|
44
43
|
import { OlLayerAdded, OlLayerUpdated } from '../../components/map/OlLayer';
|
|
44
|
+
import NumericInputWindow from '../../components/NumericInputWindow';
|
|
45
45
|
import FeatureStyles from '../../utils/FeatureStyles';
|
|
46
46
|
import MapUtils from '../../utils/MapUtils';
|
|
47
47
|
import MeasureUtils from '../../utils/MeasureUtils';
|
|
@@ -293,7 +293,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
|
|
|
293
293
|
ev.feature.set('shape', _this.props.redlining.geomType);
|
|
294
294
|
_this.updateFeatureStyle(ev.feature);
|
|
295
295
|
_this.toggleFeatureMeasurements(ev.feature);
|
|
296
|
-
_this.selectFeatures([ev.feature]);
|
|
296
|
+
_this.selectFeatures([ev.feature], false);
|
|
297
297
|
}, _this);
|
|
298
298
|
drawInteraction.on('drawend', function (ev) {
|
|
299
299
|
_this.commitFeatures([ev.feature], _this.props.redlining, true);
|
|
@@ -428,7 +428,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
|
|
|
428
428
|
evt.feature.set('shape', _this.props.redlining.geomType);
|
|
429
429
|
_this.updateFeatureStyle(evt.feature);
|
|
430
430
|
_this.toggleFeatureMeasurements(evt.feature);
|
|
431
|
-
_this.selectFeatures([evt.feature]);
|
|
431
|
+
_this.selectFeatures([evt.feature], false);
|
|
432
432
|
}, _this);
|
|
433
433
|
drawInteraction.on('drawend', function () {
|
|
434
434
|
// Draw end
|
package/plugins/map3d/Draw3D.js
CHANGED
|
@@ -31,9 +31,9 @@ import PropTypes from 'prop-types';
|
|
|
31
31
|
import { Group } from 'three';
|
|
32
32
|
import { v4 as uuidv4 } from 'uuid';
|
|
33
33
|
import Icon from '../../components/Icon';
|
|
34
|
-
import TaskBar from '../../components/TaskBar';
|
|
35
34
|
import CreateTool3D from '../../components/map3d/drawtool/CreateTool3D';
|
|
36
35
|
import EditTool3D from '../../components/map3d/drawtool/EditTool3D';
|
|
36
|
+
import TaskBar from '../../components/TaskBar';
|
|
37
37
|
import ButtonBar from '../../components/widgets/ButtonBar';
|
|
38
38
|
import LocaleUtils from '../../utils/LocaleUtils';
|
|
39
39
|
|
|
@@ -208,9 +208,9 @@ var Draw3D = /*#__PURE__*/function (_React$Component) {
|
|
|
208
208
|
},
|
|
209
209
|
value: _this.state.drawGroupId
|
|
210
210
|
}, drawGroups.map(function (_ref9) {
|
|
211
|
-
var
|
|
212
|
-
objectId =
|
|
213
|
-
options =
|
|
211
|
+
var _ref0 = _slicedToArray(_ref9, 2),
|
|
212
|
+
objectId = _ref0[0],
|
|
213
|
+
options = _ref0[1];
|
|
214
214
|
return /*#__PURE__*/React.createElement("option", {
|
|
215
215
|
key: objectId,
|
|
216
216
|
value: objectId
|
|
@@ -43,8 +43,8 @@ import PropTypes from 'prop-types';
|
|
|
43
43
|
import { Box3, BufferGeometry, Float32BufferAttribute, Group, Matrix4, Mesh, MeshStandardMaterial, Quaternion, Scene, Vector3 } from 'three';
|
|
44
44
|
import { GLTFExporter } from 'three/addons/exporters/GLTFExporter.js';
|
|
45
45
|
import { setCurrentTask } from '../../actions/task';
|
|
46
|
-
import SideBar from '../../components/SideBar';
|
|
47
46
|
import { TileMeshHelper } from '../../components/map3d/utils/MiscUtils3D';
|
|
47
|
+
import SideBar from '../../components/SideBar';
|
|
48
48
|
import Spinner from '../../components/widgets/Spinner';
|
|
49
49
|
import LocaleUtils from '../../utils/LocaleUtils';
|
|
50
50
|
import VectorLayerUtils from '../../utils/VectorLayerUtils';
|
|
@@ -36,8 +36,8 @@ import isEmpty from 'lodash.isempty';
|
|
|
36
36
|
import PropTypes from 'prop-types';
|
|
37
37
|
import { BufferAttribute, BufferGeometry, Float32BufferAttribute, Mesh, MeshStandardMaterial, Raycaster, Vector2 } from 'three';
|
|
38
38
|
import Icon from '../../components/Icon';
|
|
39
|
-
import SideBar from '../../components/SideBar';
|
|
40
39
|
import { TileMeshHelper } from '../../components/map3d/utils/MiscUtils3D';
|
|
40
|
+
import SideBar from '../../components/SideBar';
|
|
41
41
|
import LocaleUtils from '../../utils/LocaleUtils';
|
|
42
42
|
import './style/HideObjects3D.css';
|
|
43
43
|
|
|
@@ -61,7 +61,7 @@ var HideObjects3D = /*#__PURE__*/function (_React$Component) {
|
|
|
61
61
|
}, isEmpty(_this.state.hiddenObjects) ? /*#__PURE__*/React.createElement("i", null, LocaleUtils.tr("hideobjects3d.clickonmap")) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
62
62
|
className: "hideobjects3d-list"
|
|
63
63
|
}, _this.state.hiddenObjects.map(function (entry) {
|
|
64
|
-
var
|
|
64
|
+
var _entry$featureId;
|
|
65
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
66
66
|
key: entry.object.uuid + entry.featureId,
|
|
67
67
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -70,7 +70,7 @@ var HideObjects3D = /*#__PURE__*/function (_React$Component) {
|
|
|
70
70
|
onMouseLeave: function onMouseLeave() {
|
|
71
71
|
return _this.hideHighlight(entry);
|
|
72
72
|
}
|
|
73
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
73
|
+
}, /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("hideobjects3d.object") + " " + ((_entry$featureId = entry.featureId) !== null && _entry$featureId !== void 0 ? _entry$featureId : "")), /*#__PURE__*/React.createElement(Icon, {
|
|
74
74
|
icon: "eye",
|
|
75
75
|
onClick: function onClick() {
|
|
76
76
|
return _this.restoreObject(entry);
|
|
@@ -118,11 +118,11 @@ var HideObjects3D = /*#__PURE__*/function (_React$Component) {
|
|
|
118
118
|
var y = -((ev.clientY - rect.top) / rect.height) * 2 + 1;
|
|
119
119
|
raycaster.setFromCamera(new Vector2(x, y), camera);
|
|
120
120
|
var picks = [];
|
|
121
|
-
Object.entries(_this.props.sceneContext.sceneObjects).forEach(function (
|
|
121
|
+
Object.entries(_this.props.sceneContext.sceneObjects).forEach(function (_ref) {
|
|
122
122
|
var _object$tiles;
|
|
123
|
-
var
|
|
124
|
-
objId =
|
|
125
|
-
options =
|
|
123
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
124
|
+
objId = _ref2[0],
|
|
125
|
+
options = _ref2[1];
|
|
126
126
|
if (!options.layertree || !options.visibility) {
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
@@ -36,8 +36,8 @@ import axios from 'axios';
|
|
|
36
36
|
import isEmpty from 'lodash.isempty';
|
|
37
37
|
import PropTypes from 'prop-types';
|
|
38
38
|
import { BufferGeometry, Float32BufferAttribute, Mesh, MeshStandardMaterial, Raycaster, Vector2 } from 'three';
|
|
39
|
-
import ResizeableWindow from '../../components/ResizeableWindow';
|
|
40
39
|
import { TileMeshHelper } from '../../components/map3d/utils/MiscUtils3D';
|
|
40
|
+
import ResizeableWindow from '../../components/ResizeableWindow';
|
|
41
41
|
import LocaleUtils from '../../utils/LocaleUtils';
|
|
42
42
|
import '../../components/style/IdentifyViewer.css';
|
|
43
43
|
|
|
@@ -37,8 +37,8 @@ import isEmpty from 'lodash.isempty';
|
|
|
37
37
|
import PropTypes from 'prop-types';
|
|
38
38
|
import { setCurrentTask } from '../../actions/task';
|
|
39
39
|
import Icon from '../../components/Icon';
|
|
40
|
-
import SideBar from '../../components/SideBar';
|
|
41
40
|
import ImportObjects3D from '../../components/map3d/ImportObjects3D';
|
|
41
|
+
import SideBar from '../../components/SideBar';
|
|
42
42
|
import NumberInput from '../../components/widgets/NumberInput';
|
|
43
43
|
import LocaleUtils from '../../utils/LocaleUtils';
|
|
44
44
|
import './style/LayerTree3D.css';
|