mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Keep Context inside the package boundaries
The shell passes the ground picker to the click bridge, so the UI shell no longer pulls in the annotation and search stack. Context's new modules are owned by the packages that import them and formatted with the rest. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
c351e66af9
commit
902689da8a
11 files changed
+426
-122
No files matched your search
@@ -40,8 +40,18 @@ export const TAB_AFFECTS = {
|
||||
|
||||
export const LAYER_TABS = [
|
||||
// Labels and cards the world overlay draws for the label layers.
|
||||
{ id: 'labels', label: 'Labels', icon: 'label', when: (on) => TAB_AFFECTS.labels(on).length > 0 },
|
||||
{ id: 'aircraft', label: '3D aircraft', icon: 'flight', when: (on) => TAB_AFFECTS.aircraft(on).length > 0 },
|
||||
{
|
||||
id: 'labels',
|
||||
label: 'Labels',
|
||||
icon: 'label',
|
||||
when: (on) => TAB_AFFECTS.labels(on).length > 0,
|
||||
},
|
||||
{
|
||||
id: 'aircraft',
|
||||
label: '3D aircraft',
|
||||
icon: 'flight',
|
||||
when: (on) => TAB_AFFECTS.aircraft(on).length > 0,
|
||||
},
|
||||
];
|
||||
|
||||
/** Ids of the layers that are on; Context refreshes it. */
|
||||
@@ -59,7 +69,9 @@ export const contextReady = ref(false);
|
||||
|
||||
/** The tabs available now. */
|
||||
export const availableTabs = computed(() =>
|
||||
contextReady.value ? LAYER_TABS.filter((tab) => tab.when(enabledLayerIds.value)) : [],
|
||||
contextReady.value
|
||||
? LAYER_TABS.filter((tab) => tab.when(enabledLayerIds.value))
|
||||
: [],
|
||||
);
|
||||
|
||||
export const hasTab = (id) => availableTabs.value.some((tab) => tab.id === id);
|
||||
|
||||
Reference in new issue
Block a user