@vcmap/ui 5.0.0 → 5.0.2
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 +12 -2
- package/config/www.config.json +58 -16
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.306872.js → core.bb64ed.js} +15 -9
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-661636d9.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.e84ce9.css → ui.aeb2ec.css} +1 -1
- package/dist/assets/{ui.e84ce9.js → ui.aeb2ec.js} +4815 -4378
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.008fac.js → vuetify.3ed426.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +2 -2
- package/index.html +1 -1
- package/package.json +8 -8
- package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +5 -0
- package/src/actions/StyleSelector.vue +24 -9
- package/src/actions/actionHelper.js +31 -3
- 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/collectionManager/CollectionComponent.vue +4 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +28 -9
- package/src/manager/toolbox/toolboxManager.js +5 -2
- package/src/manager/window/windowManager.js +4 -1
- package/src/navigation/MapNavigation.vue +31 -46
- package/src/vcsUiApp.js +1 -1
- package/dist/assets/index-cfed33b1.js +0 -1
- /package/dist/assets/{cesium.4137c8.js → cesium.a3a1dc.js} +0 -0
- /package/dist/assets/{ol.328bbf.js → ol.833fa9.js} +0 -0
- /package/dist/assets/{vue.1c8696.js → vue.8e1850.js} +0 -0
- /package/dist/assets/{vuetify.008fac.css → vuetify.3ed426.css} +0 -0
@@ -5,6 +5,7 @@ import { reactive } from 'vue';
|
|
5
5
|
import { vcsAppSymbol } from '../../pluginHelper.js';
|
6
6
|
import ButtonManager from '../buttonManager.js';
|
7
7
|
import { ActionPattern } from '../../components/lists/VcsActionList.vue';
|
8
|
+
import { getActionFromOptions } from '../../actions/actionHelper.js';
|
8
9
|
|
9
10
|
/**
|
10
11
|
* Possible group types. Define behaviour of group:
|
@@ -266,13 +267,14 @@ class ToolboxManager {
|
|
266
267
|
|
267
268
|
if (type === ToolboxType.SINGLE) {
|
268
269
|
check(toolboxComponentOptions.action, ActionPattern);
|
270
|
+
const action = getActionFromOptions(toolboxComponentOptions.action);
|
269
271
|
/**
|
270
272
|
* @type {SingleToolboxComponent}
|
271
273
|
*/
|
272
274
|
toolboxComponent = {
|
273
275
|
...toolboxComponent,
|
274
276
|
get action() {
|
275
|
-
return reactive(
|
277
|
+
return reactive(action);
|
276
278
|
},
|
277
279
|
};
|
278
280
|
} else if (type === ToolboxType.SELECT) {
|
@@ -290,13 +292,14 @@ class ToolboxManager {
|
|
290
292
|
},
|
291
293
|
],
|
292
294
|
});
|
295
|
+
const action = getActionFromOptions(toolboxComponentOptions.action);
|
293
296
|
/**
|
294
297
|
* @type {SelectToolboxComponent}
|
295
298
|
*/
|
296
299
|
toolboxComponent = {
|
297
300
|
...toolboxComponent,
|
298
301
|
get action() {
|
299
|
-
return reactive(
|
302
|
+
return reactive(action);
|
300
303
|
},
|
301
304
|
};
|
302
305
|
} else {
|
@@ -338,7 +338,10 @@ class WindowManager {
|
|
338
338
|
* @private
|
339
339
|
*/
|
340
340
|
_handleSlotsChanged(changedSlot) {
|
341
|
-
if (
|
341
|
+
if (
|
342
|
+
changedSlot === WindowSlot.STATIC ||
|
343
|
+
changedSlot === WindowSlot.DYNAMIC_LEFT
|
344
|
+
) {
|
342
345
|
const staticWindow = this._findWindowBySlot(WindowSlot.STATIC);
|
343
346
|
const dynamicWindowLeft = this._findWindowBySlot(WindowSlot.DYNAMIC_LEFT);
|
344
347
|
if (staticWindow && dynamicWindowLeft) {
|
@@ -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 {
|
package/src/vcsUiApp.js
CHANGED
@@ -83,7 +83,7 @@ import { callbackClassRegistry } from './callback/vcsCallback.js';
|
|
83
83
|
* @property {function():P} [toJSON] - should return the plugin's serialization excluding all default values
|
84
84
|
* @property {function():P} [getDefaultOptions] - should return the plugin's default options
|
85
85
|
* @property {function(boolean=):S|Promise<S>} [getState] - should return the plugin's state or a promise for said state. is passed a "for url" flag. If true, only the state relevant for sharing a URL should be passed and short keys shall be used
|
86
|
-
* @property {Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
|
86
|
+
* @property {function():Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
|
87
87
|
* @property {function():Promise<void>} destroy
|
88
88
|
* @api
|
89
89
|
*/
|
@@ -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
|