@vcmap/ui 5.0.0 → 5.0.1
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/config/base.config.json +10 -0
- package/config/www.config.json +57 -15
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.306872.js → core.860907.js} +7 -7
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-f265c560.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.e84ce9.css → ui.7758a8.css} +1 -1
- package/dist/assets/{ui.e84ce9.js → ui.7758a8.js} +4761 -4340
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.008fac.js → vuetify.2818ff.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +5 -0
- package/src/actions/StyleSelector.vue +24 -9
- package/src/actions/actionHelper.js +19 -1
- package/src/components/lists/VcsList.vue +5 -2
- package/src/components/lists/VcsTreeview.vue +6 -6
- package/src/components/style/VcsImageSelector.vue +423 -14
- package/src/components/tables/VcsDataTable.vue +29 -1
- package/src/manager/buttonManager.js +3 -1
- package/src/manager/toolbox/toolboxManager.js +5 -2
- package/src/manager/window/windowManager.js +4 -1
- package/src/navigation/MapNavigation.vue +31 -46
- package/dist/assets/index-cfed33b1.js +0 -1
- /package/dist/assets/{cesium.4137c8.js → cesium.888ef7.js} +0 -0
- /package/dist/assets/{ol.328bbf.js → ol.5e8a90.js} +0 -0
- /package/dist/assets/{vue.1c8696.js → vue.9771b3.js} +0 -0
- /package/dist/assets/{vuetify.008fac.css → vuetify.2818ff.css} +0 -0
@@ -40,10 +40,7 @@
|
|
40
40
|
import { computed, inject, ref, reactive, onUnmounted } from 'vue';
|
41
41
|
import { ObliqueMap, CesiumMap } from '@vcmap/core';
|
42
42
|
import { VContainer, VRow } from 'vuetify/lib';
|
43
|
-
import {
|
44
|
-
createGoToViewpointAction,
|
45
|
-
createOverviewMapAction,
|
46
|
-
} from '../actions/actionHelper.js';
|
43
|
+
import { createOverviewMapAction } from '../actions/actionHelper.js';
|
47
44
|
import {
|
48
45
|
getWindowComponentOptions,
|
49
46
|
overviewMapLayerSymbol,
|
@@ -55,24 +52,24 @@
|
|
55
52
|
import OrientationToolsButton from './OrientationToolsButton.vue';
|
56
53
|
|
57
54
|
/**
|
58
|
-
* @description Creates a go-to viewpoint action from a startingViewpointName defined in a module
|
55
|
+
* @description Creates a go-to viewpoint action from a startingViewpointName defined in a module. If no startingViewpointName is defined, uses default map view as fallback.
|
59
56
|
* @param {VcsUiApp} app
|
60
|
-
* @returns {{action: import("vue").Reactive<
|
57
|
+
* @returns {{ action: import("vue").Reactive<VcsAction>, destroy: function():void }}
|
61
58
|
*/
|
62
59
|
function setupHomeButton(app) {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
const
|
75
|
-
let viewpoint
|
60
|
+
let defaultViewpoint;
|
61
|
+
let listener;
|
62
|
+
if (app.maps.activeMap) {
|
63
|
+
defaultViewpoint = app.maps.activeMap?.getViewpointSync();
|
64
|
+
} else {
|
65
|
+
listener = app.maps.mapActivated.addEventListener((map) => {
|
66
|
+
defaultViewpoint = map.getViewpointSync();
|
67
|
+
listener();
|
68
|
+
});
|
69
|
+
}
|
70
|
+
|
71
|
+
const getStartingViewpoint = () => {
|
72
|
+
let viewpoint;
|
76
73
|
for (let idx = app.modules.length - 1; idx >= 0; idx--) {
|
77
74
|
const { startingViewpointName } = app.modules[idx].config;
|
78
75
|
if (
|
@@ -83,35 +80,21 @@
|
|
83
80
|
break;
|
84
81
|
}
|
85
82
|
}
|
86
|
-
|
87
|
-
Object.assign(action, { ...initialAction });
|
88
|
-
} else {
|
89
|
-
Object.assign(
|
90
|
-
action,
|
91
|
-
createGoToViewpointAction(
|
92
|
-
{
|
93
|
-
name: 'home-action',
|
94
|
-
title: 'navigation.homeButton',
|
95
|
-
icon: '$vcsHomePoint',
|
96
|
-
},
|
97
|
-
viewpoint,
|
98
|
-
app.viewpoints,
|
99
|
-
app.maps,
|
100
|
-
),
|
101
|
-
);
|
102
|
-
}
|
83
|
+
return viewpoint;
|
103
84
|
};
|
104
85
|
|
105
|
-
const
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
86
|
+
const action = reactive({
|
87
|
+
name: 'home-action',
|
88
|
+
title: 'navigation.homeButton',
|
89
|
+
icon: '$vcsHomePoint',
|
90
|
+
async callback() {
|
91
|
+
await app.maps.activeMap?.gotoViewpoint(
|
92
|
+
getStartingViewpoint() || defaultViewpoint,
|
93
|
+
);
|
94
|
+
},
|
95
|
+
});
|
113
96
|
|
114
|
-
return { action, destroy };
|
97
|
+
return { action, destroy: () => listener?.() };
|
115
98
|
}
|
116
99
|
|
117
100
|
/**
|
@@ -241,9 +224,11 @@
|
|
241
224
|
if (overviewDestroy) {
|
242
225
|
overviewDestroy();
|
243
226
|
}
|
227
|
+
if (homeDestroy) {
|
228
|
+
homeDestroy();
|
229
|
+
}
|
244
230
|
postRenderHandler();
|
245
231
|
overviewMapListeners.forEach((cb) => cb());
|
246
|
-
homeDestroy();
|
247
232
|
});
|
248
233
|
|
249
234
|
return {
|
@@ -1 +0,0 @@
|
|
1
|
-
import{initAppFromAppConfig as p}from"./ui.e84ce9.js";p("#app","app.config.json");
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|