@vcmap/ui 5.2.4 → 5.3.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 +54 -0
- package/config/www.config.json +4 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.83d353.js → core.380ce3.js} +3498 -3347
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-b466fb2c.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.300809.css → ui.cf282c.css} +1 -1
- package/dist/assets/{ui.300809.js → ui.cf282c.js} +7275 -6745
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.b3de7a.js → vuetify.12f757.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.d.ts +4 -0
- package/index.js +2 -0
- package/package.json +2 -2
- package/plugins/package.json +2 -1
- package/src/application/VcsApp.vue +162 -1
- package/src/application/VcsApp.vue.d.ts +15 -0
- package/src/application/VcsCustomScreen.vue +45 -0
- package/src/application/VcsCustomScreen.vue.d.ts +15 -0
- package/src/application/VcsSettings.vue +67 -0
- package/src/application/VcsSettings.vue.d.ts +2 -0
- package/src/application/VcsSplashScreen.vue +140 -0
- package/src/application/VcsSplashScreen.vue.d.ts +36 -0
- package/src/application/markdownHelper.js +19 -1
- package/src/components/icons/+all.js +4 -0
- package/src/components/icons/CrosshairIcon.vue +33 -0
- package/src/components/icons/CrosshairIcon.vue.d.ts +2 -0
- package/src/i18n/de.d.ts +43 -18
- package/src/i18n/de.js +25 -0
- package/src/i18n/en.d.ts +43 -18
- package/src/i18n/en.js +25 -0
- package/src/navigation/MapNavigation.vue +74 -4
- package/src/navigation/MapNavigation.vue.d.ts +36 -0
- package/src/navigation/ObliqueRotation.vue +8 -0
- package/src/navigation/ObliqueRotation.vue.d.ts +13 -1
- package/src/navigation/TiltSlider.vue +8 -1
- package/src/navigation/TiltSlider.vue.d.ts +13 -1
- package/src/navigation/VcsCompass.vue +7 -1
- package/src/navigation/VcsCompass.vue.d.ts +11 -0
- package/src/navigation/VcsZoomButton.vue +10 -0
- package/src/navigation/VcsZoomButton.vue.d.ts +15 -1
- package/src/navigation/locatorHelper.d.ts +9 -0
- package/src/navigation/locatorHelper.js +294 -0
- package/src/navigation/overviewMap.d.ts +21 -20
- package/src/navigation/overviewMap.js +51 -39
- package/src/uiConfig.d.ts +67 -0
- package/src/uiConfig.js +30 -0
- package/dist/assets/index-69733149.js +0 -1
- /package/dist/assets/{cesium.162cd3.js → cesium.86b93e.js} +0 -0
- /package/dist/assets/{ol.7cdede.js → ol.d0972a.js} +0 -0
- /package/dist/assets/{vue.27f25a.js → vue.89f1c0.js} +0 -0
- /package/dist/assets/{vuetify.b3de7a.css → vuetify.12f757.css} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui.
|
1
|
+
export * from "./ui.cf282c.js";
|
package/dist/assets/vue.js
CHANGED
@@ -13,7 +13,7 @@ function loadCss(href) {
|
|
13
13
|
elem.onerror = reject;
|
14
14
|
document.head.appendChild(elem);
|
15
15
|
});
|
16
|
-
} await loadCss('./assets/vuetify.
|
16
|
+
} await loadCss('./assets/vuetify.12f757.css');import v from "./vue.89f1c0.js";
|
17
17
|
const Ne = v.extend().extend({
|
18
18
|
name: "themeable",
|
19
19
|
provide() {
|
package/dist/assets/vuetify.js
CHANGED
package/dist/index.html
CHANGED
package/index.d.ts
CHANGED
@@ -206,6 +206,10 @@ export { default as FileDrop } from "./src/components/import/FileDrop.vue";
|
|
206
206
|
export type * from "./src/components/import/FileDrop.vue.d.ts";
|
207
207
|
export { default as ImportComponent } from "./src/components/import/ImportComponent.vue";
|
208
208
|
export type * from "./src/components/import/ImportComponent.vue.d.ts";
|
209
|
+
export { default as VcsSplashScreen } from "./src/application/VcsSplashScreen.vue";
|
210
|
+
export type * from "./src/application/VcsSplashScreen.vue.d.ts";
|
211
|
+
export { default as VcsCustomScreen } from "./src/application/VcsCustomScreen.vue";
|
212
|
+
export type * from "./src/application/VcsCustomScreen.vue.d.ts";
|
209
213
|
export { createMapButtonAction, createToggleAction, createOverviewMapAction, createModalAction, createLinkAction, createGoToViewpointAction, createZoomToFeatureAction } from "./src/actions/actionHelper.js";
|
210
214
|
export type * from "./src/actions/actionHelper.d.ts";
|
211
215
|
export { parseAndSanitizeMarkdown, replaceAttributes } from "./src/application/markdownHelper.js";
|
package/index.js
CHANGED
@@ -322,3 +322,5 @@ export { default as VcsFeatureStyleComponent } from './src/components/style/VcsF
|
|
322
322
|
export { default as AbstractConfigEditor } from './src/components/plugins/AbstractConfigEditor.vue';
|
323
323
|
export { default as FileDrop } from './src/components/import/FileDrop.vue';
|
324
324
|
export { default as ImportComponent } from './src/components/import/ImportComponent.vue';
|
325
|
+
export { default as VcsSplashScreen } from './src/application/VcsSplashScreen.vue';
|
326
|
+
export { default as VcsCustomScreen } from './src/application/VcsCustomScreen.vue';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.3.1",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -53,7 +53,7 @@
|
|
53
53
|
},
|
54
54
|
"peerDependencies": {
|
55
55
|
"@vcmap-cesium/engine": "^4.0.3",
|
56
|
-
"@vcmap/core": "^5.
|
56
|
+
"@vcmap/core": "^5.3.0",
|
57
57
|
"ol": "^7.5.2",
|
58
58
|
"vue": "~2.7.3",
|
59
59
|
"vuetify": "~2.6.7"
|
package/plugins/package.json
CHANGED
@@ -18,7 +18,8 @@
|
|
18
18
|
"@vcmap/height-profile": "^1.0.0",
|
19
19
|
"@vcmap/search-wfs": "^1.0.0",
|
20
20
|
"@vcmap/search-esri": "^1.0.0",
|
21
|
-
"@vcmap/link-button": "^1.0.0"
|
21
|
+
"@vcmap/link-button": "^1.0.0",
|
22
|
+
"@vcmap/walk": "^1.0.2"
|
22
23
|
},
|
23
24
|
"optionalDependencies": {
|
24
25
|
"@vcmap/planning": "^5.2.0"
|
@@ -1,5 +1,11 @@
|
|
1
1
|
<template>
|
2
2
|
<v-container class="fill-height pa-0" absolute fluid>
|
3
|
+
<VcsSplashScreen
|
4
|
+
v-if="splashScreen"
|
5
|
+
v-model="splashScreenRef"
|
6
|
+
:options="splashScreen"
|
7
|
+
:window-id="'splashScreen'"
|
8
|
+
></VcsSplashScreen>
|
3
9
|
<VcsNavbar />
|
4
10
|
<VcsContainer :attribution-action="attributionAction" />
|
5
11
|
<v-footer
|
@@ -46,6 +52,7 @@
|
|
46
52
|
onMounted,
|
47
53
|
onUnmounted,
|
48
54
|
provide,
|
55
|
+
ref,
|
49
56
|
watch,
|
50
57
|
} from 'vue';
|
51
58
|
import { getVcsAppById, moduleIdSymbol } from '@vcmap/core';
|
@@ -68,6 +75,8 @@
|
|
68
75
|
import { getLegendEntries } from '../legend/legendHelper.js';
|
69
76
|
import VcsAttributionsFooter from './VcsAttributionsFooter.vue';
|
70
77
|
import VcsTextPageFooter from './VcsTextPageFooter.vue';
|
78
|
+
import VcsSplashScreen from './VcsSplashScreen.vue';
|
79
|
+
import VcsCustomScreen from './VcsCustomScreen.vue';
|
71
80
|
import VcsAttributions from './VcsAttributions.vue';
|
72
81
|
import { getAttributions } from './attributionsHelper.js';
|
73
82
|
import VcsDefaultLogoMobile from '../logo-mobile.svg';
|
@@ -254,6 +263,109 @@
|
|
254
263
|
};
|
255
264
|
}
|
256
265
|
|
266
|
+
/**
|
267
|
+
* This helper function will add a customScreen action button to the apps NavbarManager MENU location.
|
268
|
+
* @param {import("../vcsUiApp.js").default} app
|
269
|
+
* @returns {function():void}
|
270
|
+
*/
|
271
|
+
function setupCustomScreen(app) {
|
272
|
+
function setupCustomScreenAction() {
|
273
|
+
const { customScreen } = app.uiConfig.config.value;
|
274
|
+
const { action: customScreenAction, destroy: customScreenDestroy } =
|
275
|
+
createToggleAction(
|
276
|
+
{
|
277
|
+
name: customScreen.name || 'components.customScreen.name',
|
278
|
+
icon: customScreen.icon || 'mdi-information',
|
279
|
+
title: customScreen.title,
|
280
|
+
},
|
281
|
+
{
|
282
|
+
id: 'customScreenId',
|
283
|
+
component: VcsCustomScreen,
|
284
|
+
state: {
|
285
|
+
headerIcon: customScreen.icon,
|
286
|
+
headerTitle: customScreen.name,
|
287
|
+
},
|
288
|
+
slot: WindowSlot.DETACHED,
|
289
|
+
position: customScreen.windowPosition,
|
290
|
+
props: {
|
291
|
+
content: customScreen.content,
|
292
|
+
},
|
293
|
+
},
|
294
|
+
app.windowManager,
|
295
|
+
vcsAppSymbol,
|
296
|
+
);
|
297
|
+
app.navbarManager.add(
|
298
|
+
{
|
299
|
+
id: 'customScreenToggle',
|
300
|
+
action: customScreenAction,
|
301
|
+
},
|
302
|
+
vcsAppSymbol,
|
303
|
+
ButtonLocation.MENU,
|
304
|
+
);
|
305
|
+
return () => {
|
306
|
+
customScreenDestroy();
|
307
|
+
};
|
308
|
+
}
|
309
|
+
let customScreen;
|
310
|
+
const stopCustomScreenWatcher = watch(
|
311
|
+
() => app.uiConfig.config.value.customScreen,
|
312
|
+
(newCustomScreen) => {
|
313
|
+
if (app.navbarManager.has('customScreenToggle')) {
|
314
|
+
app.navbarManager.remove('customScreenToggle');
|
315
|
+
}
|
316
|
+
if (newCustomScreen) {
|
317
|
+
customScreen = setupCustomScreenAction();
|
318
|
+
}
|
319
|
+
},
|
320
|
+
{ immediate: true },
|
321
|
+
);
|
322
|
+
return () => {
|
323
|
+
if (customScreen) {
|
324
|
+
customScreen();
|
325
|
+
}
|
326
|
+
stopCustomScreenWatcher();
|
327
|
+
};
|
328
|
+
}
|
329
|
+
/**
|
330
|
+
* This helper function will add a Splash Screen action button to the apps NavbarManager MENU location.
|
331
|
+
* @param {import("../vcsUiApp.js").default} app
|
332
|
+
* @param {import("vue").Ref} splashScreenRef
|
333
|
+
* @returns {WatchStopHandle}
|
334
|
+
*/
|
335
|
+
function setupSplashScreen(app, splashScreenRef) {
|
336
|
+
function setupSplashScreenAction() {
|
337
|
+
const { splashScreen } = app.uiConfig.config.value;
|
338
|
+
const splashScreenAction = {
|
339
|
+
name: splashScreen.name || 'components.splashScreen.name',
|
340
|
+
icon: splashScreen.icon || 'mdi-alert-box',
|
341
|
+
title: splashScreen.title,
|
342
|
+
callback() {
|
343
|
+
splashScreenRef.value = !splashScreenRef.value;
|
344
|
+
},
|
345
|
+
};
|
346
|
+
app.navbarManager.add(
|
347
|
+
{
|
348
|
+
id: 'splashScreenToggle',
|
349
|
+
action: splashScreenAction,
|
350
|
+
},
|
351
|
+
vcsAppSymbol,
|
352
|
+
ButtonLocation.MENU,
|
353
|
+
);
|
354
|
+
}
|
355
|
+
|
356
|
+
return watch(
|
357
|
+
() => app.uiConfig.config.value.splashScreen,
|
358
|
+
(newSplashScreen) => {
|
359
|
+
if (app.navbarManager.has('splashScreenToggle')) {
|
360
|
+
app.navbarManager.remove('splashScreenToggle');
|
361
|
+
}
|
362
|
+
if (newSplashScreen && newSplashScreen.menuEntry) {
|
363
|
+
setupSplashScreenAction();
|
364
|
+
}
|
365
|
+
},
|
366
|
+
{ immediate: true },
|
367
|
+
);
|
368
|
+
}
|
257
369
|
/**
|
258
370
|
* This helper function will add a settings action button to the apps NavbarManager MENU location.
|
259
371
|
* @param {import("../vcsUiApp.js").default} app
|
@@ -456,6 +568,33 @@
|
|
456
568
|
};
|
457
569
|
}
|
458
570
|
|
571
|
+
/**
|
572
|
+
* This helper sets up a listener to sync the display quality settings from the {@see UiConfigObject}
|
573
|
+
* @param {import("../vcsUiApp.js").default} app
|
574
|
+
* @returns {function():void} - call to stop syncing
|
575
|
+
*/
|
576
|
+
export function setupUiConfigDisplayQuality(app) {
|
577
|
+
const listeners = [
|
578
|
+
app.uiConfig.added.addEventListener((item) => {
|
579
|
+
if (item.name === 'displayQuality') {
|
580
|
+
app.displayQuality.updateOptions(item.value);
|
581
|
+
}
|
582
|
+
}),
|
583
|
+
app.uiConfig.removed.addEventListener((item) => {
|
584
|
+
if (item.name === 'displayQuality') {
|
585
|
+
app.displayQuality.updateOptions({});
|
586
|
+
}
|
587
|
+
}),
|
588
|
+
];
|
589
|
+
|
590
|
+
return () => {
|
591
|
+
listeners.forEach((cb) => {
|
592
|
+
cb();
|
593
|
+
});
|
594
|
+
listeners.splice(0);
|
595
|
+
};
|
596
|
+
}
|
597
|
+
|
459
598
|
/**
|
460
599
|
* This helper gets attributions of all active maps, layers and oblique collections and returns an array of entries.
|
461
600
|
* It also returns a attributionAction to toggle the attributions window and a destroy function.
|
@@ -507,6 +646,7 @@
|
|
507
646
|
VcsPositionDisplay,
|
508
647
|
VcsAttributionsFooter,
|
509
648
|
VcsTextPageFooter,
|
649
|
+
VcsSplashScreen,
|
510
650
|
VcsNavbar,
|
511
651
|
VContainer,
|
512
652
|
VFooter,
|
@@ -521,16 +661,19 @@
|
|
521
661
|
/** @type {import("../vcsUiApp.js").default} */
|
522
662
|
const app = getVcsAppById(props.appId);
|
523
663
|
provide('vcsApp', app);
|
524
|
-
|
525
664
|
const mapNavbarListener = setupMapNavbar(app);
|
526
665
|
const legendDestroy = setupLegendWindow(app);
|
527
666
|
const settingsDestroy = setupSettingsWindow(app);
|
667
|
+
const stopCustomScreen = setupCustomScreen(app);
|
668
|
+
const splashScreenRef = ref(true);
|
669
|
+
const stopSplashScreen = setupSplashScreen(app, splashScreenRef);
|
528
670
|
setupHelpButton(app);
|
529
671
|
const destroyComponentsWindow = setupCategoryManagerWindow(app);
|
530
672
|
const destroyThemingListener = setupUiConfigTheming(
|
531
673
|
app,
|
532
674
|
getCurrentInstance().proxy.$vuetify,
|
533
675
|
);
|
676
|
+
const destroyDisplayQualityListener = setupUiConfigDisplayQuality(app);
|
534
677
|
const { attributionEntries, attributionAction, destroyAttributions } =
|
535
678
|
setupAttributions(app);
|
536
679
|
|
@@ -546,9 +689,12 @@
|
|
546
689
|
mapNavbarListener();
|
547
690
|
legendDestroy();
|
548
691
|
settingsDestroy();
|
692
|
+
stopCustomScreen();
|
693
|
+
stopSplashScreen();
|
549
694
|
destroyComponentsWindow();
|
550
695
|
destroyThemingListener();
|
551
696
|
destroyAttributions();
|
697
|
+
destroyDisplayQualityListener();
|
552
698
|
});
|
553
699
|
|
554
700
|
return {
|
@@ -578,6 +724,21 @@
|
|
578
724
|
}
|
579
725
|
return undefined;
|
580
726
|
}),
|
727
|
+
splashScreenRef,
|
728
|
+
splashScreen: computed(() => {
|
729
|
+
if (app.uiConfig.config.value.splashScreen) {
|
730
|
+
return {
|
731
|
+
title: 'components.splashScreen.name',
|
732
|
+
tooltip: 'components.splashScreen.tooltip',
|
733
|
+
position: {
|
734
|
+
width: '800px',
|
735
|
+
height: '400px',
|
736
|
+
},
|
737
|
+
...app.uiConfig.config.value.splashScreen,
|
738
|
+
};
|
739
|
+
}
|
740
|
+
return undefined;
|
741
|
+
}),
|
581
742
|
attributionEntries,
|
582
743
|
attributionAction,
|
583
744
|
};
|
@@ -49,6 +49,12 @@ export function setupCategoryManagerWindow(app: import("../vcsUiApp.js").default
|
|
49
49
|
* @returns {function():void} - call to stop syncing
|
50
50
|
*/
|
51
51
|
export function setupUiConfigTheming(app: import("../vcsUiApp.js").default, vuetify: import("vuetify").Framework): () => void;
|
52
|
+
/**
|
53
|
+
* This helper sets up a listener to sync the display quality settings from the {@see UiConfigObject}
|
54
|
+
* @param {import("../vcsUiApp.js").default} app
|
55
|
+
* @returns {function():void} - call to stop syncing
|
56
|
+
*/
|
57
|
+
export function setupUiConfigDisplayQuality(app: import("../vcsUiApp.js").default): () => void;
|
52
58
|
/**
|
53
59
|
* This helper gets attributions of all active maps, layers and oblique collections and returns an array of entries.
|
54
60
|
* It also returns a attributionAction to toggle the attributions window and a destroy function.
|
@@ -75,6 +81,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
75
81
|
title: string;
|
76
82
|
tooltip: string;
|
77
83
|
} | undefined>;
|
84
|
+
splashScreenRef: import("vue").Ref<boolean>;
|
85
|
+
splashScreen: import("vue").ComputedRef<{
|
86
|
+
title: string;
|
87
|
+
tooltip: string;
|
88
|
+
position: {
|
89
|
+
width: string;
|
90
|
+
height: string;
|
91
|
+
};
|
92
|
+
} | undefined>;
|
78
93
|
attributionEntries: import("vue").Ref<import("./attributionsHelper.js").AttributionEntry[]>;
|
79
94
|
attributionAction: import("../actions/actionHelper.js").VcsAction;
|
80
95
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<template>
|
2
|
+
<v-card>
|
3
|
+
<div class="px-2 pt-2 pb-1">
|
4
|
+
<v-card-text>
|
5
|
+
<div v-html="customScreenText"></div>
|
6
|
+
</v-card-text>
|
7
|
+
</div>
|
8
|
+
</v-card>
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
import { VCard, VCardText } from 'vuetify/lib';
|
13
|
+
|
14
|
+
import { computed, getCurrentInstance } from 'vue';
|
15
|
+
import { parseAndSanitizeMarkdown } from './markdownHelper.js';
|
16
|
+
|
17
|
+
export default {
|
18
|
+
name: 'VcsCustomScreen',
|
19
|
+
components: {
|
20
|
+
VCard,
|
21
|
+
VCardText,
|
22
|
+
},
|
23
|
+
props: {
|
24
|
+
content: {
|
25
|
+
type: String,
|
26
|
+
required: true,
|
27
|
+
},
|
28
|
+
},
|
29
|
+
setup(props) {
|
30
|
+
const vm = getCurrentInstance().proxy;
|
31
|
+
const dialog = true;
|
32
|
+
const customScreenText = computed(() => {
|
33
|
+
const translatedContent = vm.$t(props.content);
|
34
|
+
return parseAndSanitizeMarkdown(translatedContent);
|
35
|
+
});
|
36
|
+
|
37
|
+
return {
|
38
|
+
dialog,
|
39
|
+
customScreenText,
|
40
|
+
};
|
41
|
+
},
|
42
|
+
};
|
43
|
+
</script>
|
44
|
+
|
45
|
+
<style scoped lang="scss"></style>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
content: {
|
3
|
+
type: StringConstructor;
|
4
|
+
required: true;
|
5
|
+
};
|
6
|
+
}, {
|
7
|
+
dialog: boolean;
|
8
|
+
customScreenText: import("vue").ComputedRef<string>;
|
9
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
10
|
+
content: {
|
11
|
+
type: StringConstructor;
|
12
|
+
required: true;
|
13
|
+
};
|
14
|
+
}>>, {}>;
|
15
|
+
export default _default;
|
@@ -14,6 +14,27 @@
|
|
14
14
|
/>
|
15
15
|
</v-col>
|
16
16
|
</v-row>
|
17
|
+
<v-row v-if="is3D" no-gutters>
|
18
|
+
<VcsLabel html-for="settingsDisplayQuality">
|
19
|
+
{{ $t('settings.displayQuality.title') }}
|
20
|
+
</VcsLabel>
|
21
|
+
</v-row>
|
22
|
+
<v-row v-if="is3D" no-gutters class="quality-slider-padding">
|
23
|
+
<VcsSlider
|
24
|
+
step="1"
|
25
|
+
v-model="displaySettings"
|
26
|
+
type="number"
|
27
|
+
max="2"
|
28
|
+
min="0"
|
29
|
+
ticks="always"
|
30
|
+
tick-size="5"
|
31
|
+
:tick-labels="[
|
32
|
+
$t('settings.displayQuality.level.low'),
|
33
|
+
$t('settings.displayQuality.level.medium'),
|
34
|
+
$t('settings.displayQuality.level.high'),
|
35
|
+
]"
|
36
|
+
/>
|
37
|
+
</v-row>
|
17
38
|
<v-row no-gutters>
|
18
39
|
<v-col>
|
19
40
|
<VcsLabel html-for="settingsLanguageSelect">
|
@@ -38,9 +59,11 @@
|
|
38
59
|
<script>
|
39
60
|
import { ref, inject, onUnmounted, getCurrentInstance, computed } from 'vue';
|
40
61
|
import { VCol, VContainer, VRow } from 'vuetify/lib';
|
62
|
+
import { CesiumMap, DisplayQualityLevel } from '@vcmap/core';
|
41
63
|
import VcsLabel from '../components/form-inputs-controls/VcsLabel.vue';
|
42
64
|
import VcsSelect from '../components/form-inputs-controls/VcsSelect.vue';
|
43
65
|
import VcsRadio from '../components/form-inputs-controls/VcsRadio.vue';
|
66
|
+
import VcsSlider from '../components/form-inputs-controls/VcsSlider.vue';
|
44
67
|
|
45
68
|
/**
|
46
69
|
* @description The settings window of a VcsMap application
|
@@ -48,6 +71,7 @@
|
|
48
71
|
export default {
|
49
72
|
name: 'VcsSettings',
|
50
73
|
components: {
|
74
|
+
VcsSlider,
|
51
75
|
VcsSelect,
|
52
76
|
VcsRadio,
|
53
77
|
VcsLabel,
|
@@ -84,15 +108,58 @@
|
|
84
108
|
const addedListener = app.i18n.added.addEventListener(setupI18n);
|
85
109
|
const removedListener = app.i18n.removed.addEventListener(setupI18n);
|
86
110
|
|
111
|
+
const levels = [
|
112
|
+
DisplayQualityLevel.LOW,
|
113
|
+
DisplayQualityLevel.MEDIUM,
|
114
|
+
DisplayQualityLevel.HIGH,
|
115
|
+
];
|
116
|
+
const localDisplaySettings = ref();
|
117
|
+
const displaySettings = computed({
|
118
|
+
get() {
|
119
|
+
return localDisplaySettings.value;
|
120
|
+
},
|
121
|
+
set(value) {
|
122
|
+
app.displayQuality.setLevel(levels[value]);
|
123
|
+
},
|
124
|
+
});
|
125
|
+
const setDisplayQualityLevel = () => {
|
126
|
+
localDisplaySettings.value = levels.indexOf(
|
127
|
+
app.displayQuality.currentQualityLevel,
|
128
|
+
);
|
129
|
+
};
|
130
|
+
setDisplayQualityLevel();
|
131
|
+
const displayQualityListener =
|
132
|
+
app.displayQuality.qualityLevelChanged.addEventListener(
|
133
|
+
setDisplayQualityLevel,
|
134
|
+
);
|
135
|
+
|
136
|
+
const is3D = ref(false);
|
137
|
+
const updateIs3D = () => {
|
138
|
+
is3D.value = app.maps.activeMap instanceof CesiumMap;
|
139
|
+
};
|
140
|
+
const mapActivatedListener =
|
141
|
+
app.maps.mapActivated.addEventListener(updateIs3D);
|
142
|
+
updateIs3D();
|
143
|
+
|
87
144
|
onUnmounted(() => {
|
88
145
|
localeChangedListener();
|
89
146
|
addedListener();
|
90
147
|
removedListener();
|
148
|
+
displayQualityListener();
|
149
|
+
mapActivatedListener();
|
91
150
|
});
|
151
|
+
|
92
152
|
return {
|
93
153
|
language,
|
94
154
|
languages,
|
155
|
+
displaySettings,
|
156
|
+
is3D,
|
95
157
|
};
|
96
158
|
},
|
97
159
|
};
|
98
160
|
</script>
|
161
|
+
<style scoped>
|
162
|
+
.quality-slider-padding {
|
163
|
+
padding-bottom: 20px !important;
|
164
|
+
}
|
165
|
+
</style>
|
@@ -1,5 +1,7 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
2
2
|
language: import("vue").WritableComputedRef<string>;
|
3
3
|
languages: import("vue").Ref<never[]>;
|
4
|
+
displaySettings: import("vue").WritableComputedRef<any>;
|
5
|
+
is3D: import("vue").Ref<boolean>;
|
4
6
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
5
7
|
export default _default;
|
@@ -0,0 +1,140 @@
|
|
1
|
+
<template>
|
2
|
+
<v-dialog
|
3
|
+
v-if="options"
|
4
|
+
v-model="localValue"
|
5
|
+
:width="position.width"
|
6
|
+
:height="position.height"
|
7
|
+
:max-width="position.maxWidth"
|
8
|
+
:max-height="position.maxHeight"
|
9
|
+
persistent
|
10
|
+
>
|
11
|
+
<v-card>
|
12
|
+
<div class="px-2 pt-2 pb-1">
|
13
|
+
<v-card-text>
|
14
|
+
<div v-html="splashScreenText"></div>
|
15
|
+
|
16
|
+
<v-row class="mt-2" v-if="acceptInput" no-gutters>
|
17
|
+
<v-col class="align-center d-flex">
|
18
|
+
<VcsCheckbox
|
19
|
+
id="checkbox_splashScreen"
|
20
|
+
style="margin-bottom: 16px"
|
21
|
+
v-model="checkBox"
|
22
|
+
>
|
23
|
+
</VcsCheckbox>
|
24
|
+
|
25
|
+
<VcsLabel>
|
26
|
+
<div
|
27
|
+
v-html="splashScreenCheckboxText"
|
28
|
+
class="marked-checkbox-content"
|
29
|
+
></div>
|
30
|
+
</VcsLabel>
|
31
|
+
</v-col>
|
32
|
+
</v-row>
|
33
|
+
</v-card-text>
|
34
|
+
|
35
|
+
<v-card-actions>
|
36
|
+
<v-col class="text-right">
|
37
|
+
<VcsFormButton
|
38
|
+
color="primary"
|
39
|
+
@click="exitScreen"
|
40
|
+
:disabled="!checkBox"
|
41
|
+
>{{ buttonTitle }}</VcsFormButton
|
42
|
+
>
|
43
|
+
</v-col>
|
44
|
+
</v-card-actions>
|
45
|
+
</div>
|
46
|
+
</v-card>
|
47
|
+
</v-dialog>
|
48
|
+
</template>
|
49
|
+
|
50
|
+
<script>
|
51
|
+
import {
|
52
|
+
VDialog,
|
53
|
+
VCard,
|
54
|
+
VCardText,
|
55
|
+
VCardActions,
|
56
|
+
VRow,
|
57
|
+
VCol,
|
58
|
+
} from 'vuetify/lib';
|
59
|
+
import { computed, getCurrentInstance, ref, watch } from 'vue';
|
60
|
+
import { parseAndSanitizeMarkdown } from './markdownHelper.js';
|
61
|
+
import VcsFormButton from '../components/buttons/VcsFormButton.vue';
|
62
|
+
import VcsCheckbox from '../components/form-inputs-controls/VcsCheckbox.vue';
|
63
|
+
import VcsLabel from '../components/form-inputs-controls/VcsLabel.vue';
|
64
|
+
|
65
|
+
export default {
|
66
|
+
name: 'VcsSplashScreen',
|
67
|
+
components: {
|
68
|
+
VcsLabel,
|
69
|
+
VDialog,
|
70
|
+
VCard,
|
71
|
+
VCardText,
|
72
|
+
VCardActions,
|
73
|
+
VcsFormButton,
|
74
|
+
VcsCheckbox,
|
75
|
+
VRow,
|
76
|
+
VCol,
|
77
|
+
},
|
78
|
+
props: {
|
79
|
+
value: {
|
80
|
+
type: Boolean,
|
81
|
+
default: false,
|
82
|
+
},
|
83
|
+
options: {
|
84
|
+
type: Object,
|
85
|
+
required: true,
|
86
|
+
},
|
87
|
+
},
|
88
|
+
setup(props, { emit }) {
|
89
|
+
const localValue = ref(props.value);
|
90
|
+
watch(
|
91
|
+
() => props.value,
|
92
|
+
(newValue) => {
|
93
|
+
localValue.value = newValue;
|
94
|
+
},
|
95
|
+
);
|
96
|
+
const vm = getCurrentInstance().proxy;
|
97
|
+
const splashScreenText = computed(() => {
|
98
|
+
const translatedContent = vm.$t(props.options.content);
|
99
|
+
return parseAndSanitizeMarkdown(translatedContent);
|
100
|
+
});
|
101
|
+
const buttonTitle = vm.$t(props.options.buttonTitle);
|
102
|
+
|
103
|
+
const splashScreenCheckboxText = computed(() => {
|
104
|
+
const translatedContent = vm.$t(props.options.checkBoxText);
|
105
|
+
return parseAndSanitizeMarkdown(translatedContent);
|
106
|
+
});
|
107
|
+
|
108
|
+
const acceptInput = ref(props.options.acceptInput);
|
109
|
+
const checkBox = ref(!acceptInput.value);
|
110
|
+
const exitScreen = () => {
|
111
|
+
localValue.value = false;
|
112
|
+
emit('input', localValue.value);
|
113
|
+
};
|
114
|
+
|
115
|
+
const position = computed(() => ({
|
116
|
+
width: props.options.position?.width || 800,
|
117
|
+
height: props.options.position?.width || 500,
|
118
|
+
maxWidth: props.options.position?.maxWidth,
|
119
|
+
maxHeight: props.options.position?.maxHeight,
|
120
|
+
}));
|
121
|
+
|
122
|
+
return {
|
123
|
+
localValue,
|
124
|
+
exitScreen,
|
125
|
+
splashScreenText,
|
126
|
+
splashScreenCheckboxText,
|
127
|
+
checkBox,
|
128
|
+
acceptInput,
|
129
|
+
buttonTitle,
|
130
|
+
position,
|
131
|
+
};
|
132
|
+
},
|
133
|
+
};
|
134
|
+
</script>
|
135
|
+
|
136
|
+
<style scoped lang="scss">
|
137
|
+
.marked-checkbox-content ::v-deep p {
|
138
|
+
margin-bottom: 0;
|
139
|
+
}
|
140
|
+
</style>
|