@vcmap/ui 5.1.2 → 5.1.3
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/build/getPluginProxies.js +4 -1
- package/config/www.config.json +40 -6
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.753649.js → core.c815b8.js} +1300 -1290
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-0abd9815.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.a843ac.css → ui.f85ce1.css} +2 -2
- package/dist/assets/{ui.a843ac.js → ui.f85ce1.js} +1480 -1391
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.50800a.js → vuetify.bf2ba1.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/src/application/VcsPositionDisplay.vue +10 -0
- package/src/components/icons/+all.js +4 -0
- package/src/components/icons/TransparentTerrainIcon.vue +17 -0
- package/src/components/icons/TransparentTerrainIcon.vue.d.ts +2 -0
- package/src/components/import/ImportComponent.vue +6 -0
- package/src/components/import/ImportComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue +24 -18
- package/src/featureInfo/featureInfo.js +1 -1
- package/src/manager/toolbox/SelectToolboxComponent.vue +1 -1
- package/src/manager/toolbox/ToolboxManager.vue +31 -4
- package/src/manager/toolbox/ToolboxManager.vue.d.ts +3 -0
- package/src/manager/window/WindowManager.vue +1 -1
- package/src/manager/window/windowManager.d.ts +30 -1
- package/src/manager/window/windowManager.js +71 -2
- package/dist/assets/index-cc59d4fd.js +0 -1
- /package/dist/assets/{cesium.6a1548.js → cesium.012009.js} +0 -0
- /package/dist/assets/{ol.441b59.js → ol.fbe9a4.js} +0 -0
- /package/dist/assets/{vue.118f2c.js → vue.65726b.js} +0 -0
- /package/dist/assets/{vuetify.50800a.css → vuetify.bf2ba1.css} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui.
|
1
|
+
export * from "./ui.f85ce1.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.bf2ba1.css');import v from "./vue.65726b.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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "5.1.
|
3
|
+
"version": "5.1.3",
|
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.1.
|
56
|
+
"@vcmap/core": "^5.1.2",
|
57
57
|
"ol": "^7.5.2",
|
58
58
|
"vue": "~2.7.3",
|
59
59
|
"vuetify": "~2.6.7"
|
@@ -152,6 +152,16 @@
|
|
152
152
|
}
|
153
153
|
|
154
154
|
const listener = [
|
155
|
+
app.uiConfig.added.addEventListener((added) => {
|
156
|
+
if (added.name === 'positionDisplayEventType') {
|
157
|
+
setMove();
|
158
|
+
}
|
159
|
+
}),
|
160
|
+
app.uiConfig.removed.addEventListener((added) => {
|
161
|
+
if (added.name === 'positionDisplayEventType') {
|
162
|
+
setMove();
|
163
|
+
}
|
164
|
+
}),
|
155
165
|
app.moduleAdded.addEventListener(() => {
|
156
166
|
const newDefaultProjection = getDefaultProjection();
|
157
167
|
projections[newDefaultProjection.epsg] = newDefaultProjection;
|
@@ -91,6 +91,7 @@ import TextStyleIcon from './TextStyleIcon.vue';
|
|
91
91
|
import ThreeDimensionsIcon from './ThreeDimensionsIcon.vue';
|
92
92
|
import ToolsIcon from './ToolsIcon.vue';
|
93
93
|
import TouchIcon from './TouchIcon.vue';
|
94
|
+
import TransparentTerrainIcon from './TransparentTerrainIcon.vue';
|
94
95
|
import TrashCanIcon from './TrashCanIcon.vue';
|
95
96
|
import TriangleIcon from './TriangleIcon.vue';
|
96
97
|
import TwoDimensionsIcon from './TwoDimensionsIcon.vue';
|
@@ -413,6 +414,9 @@ const IconMap = {
|
|
413
414
|
touch: {
|
414
415
|
component: TouchIcon,
|
415
416
|
},
|
417
|
+
transparentTerrain: {
|
418
|
+
component: TransparentTerrainIcon,
|
419
|
+
},
|
416
420
|
trashCan: {
|
417
421
|
component: TrashCanIcon,
|
418
422
|
},
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg
|
5
|
+
id="TransparentTerrain"
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
7
|
+
viewBox="0 0 24 24"
|
8
|
+
>
|
9
|
+
<g id="Gruppe_1899">
|
10
|
+
<path
|
11
|
+
d="M23.97,11.08c-.01-.05-.03-.1-.06-.15,0-.02-.01-.04-.02-.05-.02-.02-.04-.05-.06-.07-.03-.05-.07-.09-.11-.12-.04-.03-.09-.06-.13-.09-.03-.02-.05-.04-.08-.05l-11.2-4.48c-.19-.08-.41-.08-.6,0L.5,10.54s-.06.04-.08.06c-.05.02-.09.05-.13.08-.04.04-.08.08-.11.13-.02.02-.04.04-.06.07,0,.02-.01.03-.02.05-.02.05-.04.1-.06.15-.01.05-.03.1-.03.15,0,.05,0,.09,0,.14,0,.06.02.12.03.17,0,.02,0,.03.01.05s.03.05.05.08c.03.05.06.1.1.15.04.04.07.07.12.1.02.02.05.05.07.07l6.15,3.69,5.05,3.03h.01c.25.15.56.15.81,0h.01l4.9-2.94,6.29-3.78.02-.02s.03-.03.04-.04c.1-.08.19-.18.24-.3,0-.02.03-.02.03-.04s0-.03,0-.05c.02-.06.03-.11.03-.17,0-.05,0-.09,0-.14,0-.05-.02-.1-.03-.15ZM16.86,14.15l-4.88,2.6-4.98-2.68h0s-4.38-2.63-4.38-2.63l4.87-1.95,4.53-1.81,5.01,2.01h0s4.36,1.75,4.36,1.75l-4.52,2.71Z"
|
12
|
+
fill="currentColor"
|
13
|
+
/>
|
14
|
+
<rect id="size" width="24" height="24" fill="none" />
|
15
|
+
</g>
|
16
|
+
</svg>
|
17
|
+
</template>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
@@ -4,6 +4,7 @@
|
|
4
4
|
<vcs-text-field
|
5
5
|
type="file"
|
6
6
|
v-model="files"
|
7
|
+
:loading="loading"
|
7
8
|
:multiple="multiple"
|
8
9
|
:accept="fileTypes.join(',')"
|
9
10
|
/>
|
@@ -54,6 +55,7 @@
|
|
54
55
|
setup(props, { emit }) {
|
55
56
|
const app = inject('vcsApp');
|
56
57
|
const localFiles = ref([]);
|
58
|
+
const loading = ref(false);
|
57
59
|
/**
|
58
60
|
* @type {WritableComputedRef<Array<File>>}
|
59
61
|
*/
|
@@ -68,7 +70,9 @@
|
|
68
70
|
|
69
71
|
return {
|
70
72
|
files,
|
73
|
+
loading,
|
71
74
|
async doImport() {
|
75
|
+
loading.value = true;
|
72
76
|
try {
|
73
77
|
const close = await props.importFiles(files.value);
|
74
78
|
if (close) {
|
@@ -79,6 +83,8 @@
|
|
79
83
|
type: NotificationType.ERROR,
|
80
84
|
message: String(e.message),
|
81
85
|
});
|
86
|
+
} finally {
|
87
|
+
loading.value = false;
|
82
88
|
}
|
83
89
|
},
|
84
90
|
};
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
};
|
14
14
|
}, {
|
15
15
|
files: WritableComputedRef<File[]>;
|
16
|
+
loading: import("vue").Ref<boolean>;
|
16
17
|
doImport(): Promise<void>;
|
17
18
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
18
19
|
importFiles: {
|
@@ -226,7 +226,7 @@
|
|
226
226
|
cachedViewpoint = viewpoint;
|
227
227
|
},
|
228
228
|
);
|
229
|
-
if (app.maps.activeMap
|
229
|
+
if (app.maps.activeMap?.className === OpenlayersMap.className) {
|
230
230
|
app.maps.activeMap.requestRender();
|
231
231
|
}
|
232
232
|
}
|
@@ -235,7 +235,7 @@
|
|
235
235
|
name: 'edit-viewpoint-action',
|
236
236
|
icon: active ? 'mdi-sync' : 'mdi-sync-off',
|
237
237
|
title: 'components.viewpoint.syncOff',
|
238
|
-
disabled: app.maps.activeMap
|
238
|
+
disabled: app.maps.activeMap?.className === ObliqueMap.className,
|
239
239
|
active,
|
240
240
|
callback() {
|
241
241
|
this.active = !this.active;
|
@@ -369,7 +369,7 @@
|
|
369
369
|
},
|
370
370
|
setup(props, { emit }) {
|
371
371
|
const app = inject('vcsApp');
|
372
|
-
const isCesiumMap = ref(app.maps.activeMap
|
372
|
+
const isCesiumMap = ref(app.maps.activeMap?.className === 'CesiumMap');
|
373
373
|
|
374
374
|
const name = usePrimitiveProperty(() => props.value, 'name', emit);
|
375
375
|
const title = computed({
|
@@ -377,13 +377,15 @@
|
|
377
377
|
return props.value?.properties?.title;
|
378
378
|
},
|
379
379
|
set(value) {
|
380
|
-
|
381
|
-
|
382
|
-
clone.properties
|
383
|
-
|
384
|
-
|
380
|
+
if (props.value?.properties?.title !== value) {
|
381
|
+
const clone = props.value ? structuredClone(props.value) : {};
|
382
|
+
if (clone.properties) {
|
383
|
+
clone.properties.title = value;
|
384
|
+
} else {
|
385
|
+
clone.properties = { title: value };
|
386
|
+
}
|
387
|
+
emit('input', clone);
|
385
388
|
}
|
386
|
-
emit('input', clone);
|
387
389
|
},
|
388
390
|
});
|
389
391
|
const animate = usePrimitiveProperty(() => props.value, 'animate', emit);
|
@@ -435,8 +437,10 @@
|
|
435
437
|
icon: 'mdi-camera',
|
436
438
|
title: 'components.viewpoint.updateFromView',
|
437
439
|
async callback() {
|
438
|
-
|
439
|
-
|
440
|
+
if (app.maps.activeMap) {
|
441
|
+
const viewpoint = await app.maps.activeMap.getViewpoint();
|
442
|
+
emitInput(emit, viewpoint, () => props.value);
|
443
|
+
}
|
440
444
|
},
|
441
445
|
};
|
442
446
|
|
@@ -480,14 +484,16 @@
|
|
480
484
|
}
|
481
485
|
|
482
486
|
async function handleInput(key) {
|
483
|
-
if (
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
487
|
+
if (app.maps.activeMap) {
|
488
|
+
if (key === 'groundPosition') {
|
489
|
+
cameraPosition.value = undefined;
|
490
|
+
} else if (key === 'cameraPosition') {
|
491
|
+
groundPosition.value = (
|
492
|
+
await app.maps.activeMap.getViewpoint()
|
493
|
+
).groundPosition;
|
494
|
+
}
|
495
|
+
await gotoViewpoint();
|
489
496
|
}
|
490
|
-
await gotoViewpoint();
|
491
497
|
}
|
492
498
|
|
493
499
|
return {
|
@@ -138,13 +138,13 @@ function setupFeatureInfoTool(app) {
|
|
138
138
|
callback() {
|
139
139
|
if (session) {
|
140
140
|
session.stop();
|
141
|
-
this.title = 'featureInfo.activateToolTitle';
|
142
141
|
} else {
|
143
142
|
session = createFeatureInfoSession(app);
|
144
143
|
session.stopped.addEventListener(() => {
|
145
144
|
this.active = false;
|
146
145
|
session = null;
|
147
146
|
app.featureInfo.clear();
|
147
|
+
this.title = 'featureInfo.activateToolTitle';
|
148
148
|
});
|
149
149
|
this.active = true;
|
150
150
|
this.title = 'featureInfo.deactivateToolTitle';
|
@@ -11,7 +11,7 @@
|
|
11
11
|
:active="group.action.active"
|
12
12
|
:disabled="group.action.disabled"
|
13
13
|
:background="group.action.background"
|
14
|
-
@click
|
14
|
+
@click="group.action.callback($event)"
|
15
15
|
v-bind="{ ...$attrs }"
|
16
16
|
class="vcs-toolbox-action-selected"
|
17
17
|
:min-width="32"
|
@@ -9,6 +9,8 @@
|
|
9
9
|
toolbar__secondary: !isDefaultToolbox,
|
10
10
|
}"
|
11
11
|
:height="40"
|
12
|
+
:style="{ zIndex }"
|
13
|
+
@click.stop="bringToTop"
|
12
14
|
width="fit-content"
|
13
15
|
dense
|
14
16
|
>
|
@@ -21,12 +23,12 @@
|
|
21
23
|
<ToolboxActionGroup
|
22
24
|
v-if="group.type === ToolboxType.GROUP"
|
23
25
|
:group="group"
|
24
|
-
@toggle="
|
26
|
+
@toggle="openGroup"
|
25
27
|
/>
|
26
28
|
<ToolboxActionSelect
|
27
29
|
v-else-if="group.type === ToolboxType.SELECT"
|
28
30
|
:group="group"
|
29
|
-
@toggle="
|
31
|
+
@toggle="openGroup"
|
30
32
|
/>
|
31
33
|
<VcsToolButton
|
32
34
|
v-else
|
@@ -35,7 +37,7 @@
|
|
35
37
|
:active="group.action.active"
|
36
38
|
:background="group.action.background"
|
37
39
|
:disabled="group.action.disabled"
|
38
|
-
@click
|
40
|
+
@click="group.action.callback($event)"
|
39
41
|
v-bind="{ ...$attrs }"
|
40
42
|
/>
|
41
43
|
</div>
|
@@ -133,6 +135,11 @@
|
|
133
135
|
toolboxName.value = name;
|
134
136
|
});
|
135
137
|
|
138
|
+
const zIndex = app.windowManager.addExternalIdToZIndex(
|
139
|
+
'toolbox',
|
140
|
+
vcsAppSymbol,
|
141
|
+
);
|
142
|
+
|
136
143
|
/**
|
137
144
|
* To be rendered in Toolbox components must meet certain conditions:
|
138
145
|
* - SingleToolboxComponent: no further conditions
|
@@ -189,16 +196,36 @@
|
|
189
196
|
onUnmounted(() => {
|
190
197
|
stopWatching();
|
191
198
|
nameChangeListener();
|
199
|
+
app.windowManager.removeExternalIdFromZIndex('toolbox');
|
200
|
+
});
|
201
|
+
|
202
|
+
watch(toolboxOpen, () => {
|
203
|
+
if (toolboxOpen.value) {
|
204
|
+
app.windowManager.bringWindowToTop('toolbox');
|
205
|
+
}
|
192
206
|
});
|
193
207
|
|
208
|
+
const open = ref(false);
|
209
|
+
const bringToTop = () => {
|
210
|
+
app.windowManager.bringWindowToTop('toolbox');
|
211
|
+
};
|
212
|
+
|
194
213
|
return {
|
195
214
|
toolboxOpen,
|
196
215
|
orderedGroups,
|
216
|
+
zIndex,
|
197
217
|
isDefaultToolbox: computed(
|
198
218
|
() => toolboxName.value === defaultToolboxName,
|
199
219
|
),
|
200
220
|
ToolboxType,
|
201
|
-
open
|
221
|
+
open,
|
222
|
+
bringToTop,
|
223
|
+
openGroup(group) {
|
224
|
+
open.value = group;
|
225
|
+
if (open.value) {
|
226
|
+
bringToTop();
|
227
|
+
}
|
228
|
+
},
|
202
229
|
};
|
203
230
|
},
|
204
231
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
2
2
|
toolboxOpen: import("vue").Ref<boolean>;
|
3
3
|
orderedGroups: import("vue").ComputedRef<(import("../buttonManager.js").ButtonComponent | import("./toolboxManager.js").ToolboxComponent)[]>;
|
4
|
+
zIndex: any;
|
4
5
|
isDefaultToolbox: import("vue").ComputedRef<boolean>;
|
5
6
|
ToolboxType: {
|
6
7
|
SINGLE: number;
|
@@ -8,6 +9,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
8
9
|
GROUP: number;
|
9
10
|
};
|
10
11
|
open: import("vue").Ref<boolean>;
|
12
|
+
bringToTop: () => void;
|
13
|
+
openGroup(group: any): void;
|
11
14
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
12
15
|
export default _default;
|
13
16
|
export type ToolboxButtonGroup = {
|
@@ -97,7 +97,7 @@
|
|
97
97
|
* @returns {boolean}
|
98
98
|
*/
|
99
99
|
const isOnTop = (id) => {
|
100
|
-
return windowManager.get(id)?.zIndex.value ===
|
100
|
+
return windowManager.get(id)?.zIndex.value === windowManager.maxZIndex;
|
101
101
|
};
|
102
102
|
/**
|
103
103
|
* @param {WindowComponent} windowComponent
|
@@ -302,8 +302,15 @@ declare class WindowManager implements IWindowManager {
|
|
302
302
|
/**
|
303
303
|
* reactive ordered array of ids, defining the zIndex of a component
|
304
304
|
* @type {import("vue").Ref<Array<string>>}
|
305
|
+
* @private
|
306
|
+
*/
|
307
|
+
private _zIndices;
|
308
|
+
/**
|
309
|
+
* Map of <id, owner> for external zIndexIds
|
310
|
+
* @type {Map<string, string>}
|
311
|
+
* @private
|
305
312
|
*/
|
306
|
-
|
313
|
+
private _externalZIndexIds;
|
307
314
|
/**
|
308
315
|
* @type {Map<string, WindowComponent>}
|
309
316
|
* @private
|
@@ -314,6 +321,14 @@ declare class WindowManager implements IWindowManager {
|
|
314
321
|
* @private
|
315
322
|
*/
|
316
323
|
private _windowPositionsCache;
|
324
|
+
/**
|
325
|
+
* @type {number}
|
326
|
+
*/
|
327
|
+
get maxZIndex(): number;
|
328
|
+
/**
|
329
|
+
* @return {string[]}
|
330
|
+
*/
|
331
|
+
get externalZIndexIds(): string[];
|
317
332
|
/**
|
318
333
|
* @param {string} id
|
319
334
|
* @returns {WindowComponent}
|
@@ -411,6 +426,20 @@ declare class WindowManager implements IWindowManager {
|
|
411
426
|
* @param {string|vcsAppSymbol} owner
|
412
427
|
*/
|
413
428
|
removeOwner(owner: string | symbol): void;
|
429
|
+
/**
|
430
|
+
* Adds a string id to the z index handling of windows. The returned computed
|
431
|
+
* will give you the current z index of the id. Use bringToTop with the id to bring it
|
432
|
+
* to the top, just like a window.
|
433
|
+
* @param {string} id
|
434
|
+
* @param {string|vcsAppSymbol} owner
|
435
|
+
* @return {import("vue").ComputedRef<number>}
|
436
|
+
*/
|
437
|
+
addExternalIdToZIndex(id: string, owner: string | symbol): import("vue").ComputedRef<number>;
|
438
|
+
/**
|
439
|
+
* Removes an external z index id
|
440
|
+
* @param {string} id
|
441
|
+
*/
|
442
|
+
removeExternalIdFromZIndex(id: string): void;
|
414
443
|
/**
|
415
444
|
* removes all windowComponents and fires removed Events
|
416
445
|
*/
|
@@ -269,14 +269,23 @@ class WindowManager {
|
|
269
269
|
/**
|
270
270
|
* reactive ordered array of ids, defining the zIndex of a component
|
271
271
|
* @type {import("vue").Ref<Array<string>>}
|
272
|
+
* @private
|
272
273
|
*/
|
273
274
|
this._zIndices = ref([]);
|
274
275
|
|
276
|
+
/**
|
277
|
+
* Map of <id, owner> for external zIndexIds
|
278
|
+
* @type {Map<string, string>}
|
279
|
+
* @private
|
280
|
+
*/
|
281
|
+
this._externalZIndexIds = new Map();
|
282
|
+
|
275
283
|
/**
|
276
284
|
* @type {Map<string, WindowComponent>}
|
277
285
|
* @private
|
278
286
|
*/
|
279
287
|
this._windowComponents = new Map();
|
288
|
+
|
280
289
|
/**
|
281
290
|
* @type {Map<string, WindowPosition>}
|
282
291
|
* @private
|
@@ -284,6 +293,20 @@ class WindowManager {
|
|
284
293
|
this._windowPositionsCache = new Map();
|
285
294
|
}
|
286
295
|
|
296
|
+
/**
|
297
|
+
* @type {number}
|
298
|
+
*/
|
299
|
+
get maxZIndex() {
|
300
|
+
return this._zIndices.value.length - 1;
|
301
|
+
}
|
302
|
+
|
303
|
+
/**
|
304
|
+
* @return {string[]}
|
305
|
+
*/
|
306
|
+
get externalZIndexIds() {
|
307
|
+
return [...this._externalZIndexIds.keys()];
|
308
|
+
}
|
309
|
+
|
287
310
|
/**
|
288
311
|
* @param {string} id
|
289
312
|
* @returns {WindowComponent}
|
@@ -515,7 +538,11 @@ class WindowManager {
|
|
515
538
|
add(windowComponentOptions, owner) {
|
516
539
|
check(owner, [String, vcsAppSymbol]);
|
517
540
|
|
518
|
-
if (
|
541
|
+
if (
|
542
|
+
windowComponentOptions.id &&
|
543
|
+
(this.has(windowComponentOptions.id) ||
|
544
|
+
this._externalZIndexIds.has(windowComponentOptions.id))
|
545
|
+
) {
|
519
546
|
throw new Error(
|
520
547
|
`A window with id ${windowComponentOptions.id} has already been registered.`,
|
521
548
|
);
|
@@ -569,6 +596,7 @@ class WindowManager {
|
|
569
596
|
const position = reactive(windowPosition);
|
570
597
|
const initialPosition = { ...windowPositionOptions };
|
571
598
|
const zIndex = computed(() => this._zIndices.value.indexOf(id));
|
599
|
+
|
572
600
|
/**
|
573
601
|
* @type {WindowComponent}
|
574
602
|
*/
|
@@ -627,7 +655,7 @@ class WindowManager {
|
|
627
655
|
* @param {string} id
|
628
656
|
*/
|
629
657
|
bringWindowToTop(id) {
|
630
|
-
if (this.has(id)) {
|
658
|
+
if (this.has(id) || this._externalZIndexIds.has(id)) {
|
631
659
|
const index = this._zIndices.value.indexOf(id);
|
632
660
|
if (index >= 0 && index !== this._zIndices.value.length - 1) {
|
633
661
|
this._zIndices.value.push(id);
|
@@ -675,6 +703,47 @@ class WindowManager {
|
|
675
703
|
this.remove(id);
|
676
704
|
}
|
677
705
|
});
|
706
|
+
this._externalZIndexIds.forEach((externalOwner, id) => {
|
707
|
+
if (externalOwner === owner) {
|
708
|
+
this.removeExternalIdFromZIndex(id);
|
709
|
+
}
|
710
|
+
});
|
711
|
+
}
|
712
|
+
|
713
|
+
/**
|
714
|
+
* Adds a string id to the z index handling of windows. The returned computed
|
715
|
+
* will give you the current z index of the id. Use bringToTop with the id to bring it
|
716
|
+
* to the top, just like a window.
|
717
|
+
* @param {string} id
|
718
|
+
* @param {string|vcsAppSymbol} owner
|
719
|
+
* @return {import("vue").ComputedRef<number>}
|
720
|
+
*/
|
721
|
+
addExternalIdToZIndex(id, owner) {
|
722
|
+
check(id, String);
|
723
|
+
check(owner, [String, vcsAppSymbol]);
|
724
|
+
|
725
|
+
if (this.has(id)) {
|
726
|
+
throw new Error(`Id ${id} already belongs to a window id`);
|
727
|
+
}
|
728
|
+
|
729
|
+
if (this._externalZIndexIds.has(id)) {
|
730
|
+
throw new Error(`Id ${id} is already added`);
|
731
|
+
}
|
732
|
+
this._externalZIndexIds.set(id, owner);
|
733
|
+
this._zIndices.value.push(id);
|
734
|
+
return computed(() => this._zIndices.value.indexOf(id));
|
735
|
+
}
|
736
|
+
|
737
|
+
/**
|
738
|
+
* Removes an external z index id
|
739
|
+
* @param {string} id
|
740
|
+
*/
|
741
|
+
removeExternalIdFromZIndex(id) {
|
742
|
+
this._externalZIndexIds.delete(id);
|
743
|
+
const index = this._zIndices.value.indexOf(id);
|
744
|
+
if (index > -1) {
|
745
|
+
this._zIndices.value.splice(index, 1);
|
746
|
+
}
|
678
747
|
}
|
679
748
|
|
680
749
|
/**
|
@@ -1 +0,0 @@
|
|
1
|
-
import{initAppFromAppConfig as p}from"./ui.a843ac.js";p("#app","app.config.json");
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|