mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
feat(ui): render the Display panel's imported file list from the store
The file import publishes its rows and hint to the gev-display store and DisplayPanel renders them, keyed by file, so a toggled row keeps its controls. Keyboard focus is given back once the list has rendered: a removed row's next row, else the previous one, else the Import button; a second change before the render keeps the first target, and focus moved elsewhere meanwhile stays there.
This commit is contained in:
1 parent
9eb969c682
commit
a068a45a89
7 files changed
+327
-131
No files matched your search
@@ -3,9 +3,9 @@ import { markRaw, shallowRef } from 'vue';
|
||||
|
||||
/**
|
||||
* The Display panel as its view renders it. VisualSettings presents its
|
||||
* groups (`_presentDisplay()`), AircraftDisplay the 3D aircraft group and
|
||||
* the draw tool its controls, and each publishes here; each keeps its
|
||||
* listeners on the controls.
|
||||
* groups (`_presentDisplay()`), AircraftDisplay the 3D aircraft group, the
|
||||
* draw tool its controls and the file import its list, and each publishes
|
||||
* here; each keeps its listeners on the controls.
|
||||
*/
|
||||
export const useDisplayStore = defineStore('gev-display', () => {
|
||||
/** The presented panel; null until VisualSettings first renders. */
|
||||
@@ -32,5 +32,22 @@ export const useDisplayStore = defineStore('gev-display', () => {
|
||||
draw.value = markRaw(next);
|
||||
}
|
||||
|
||||
return { view, publish, models3d, publishModels3d, draw, publishDraw };
|
||||
/** The imported files and hint; null until the file import renders. */
|
||||
const geoImport = shallowRef(null);
|
||||
|
||||
/** @param {object} next A fresh presentation of the imported files. */
|
||||
function publishGeoImport(next) {
|
||||
geoImport.value = markRaw(next);
|
||||
}
|
||||
|
||||
return {
|
||||
view,
|
||||
publish,
|
||||
models3d,
|
||||
publishModels3d,
|
||||
draw,
|
||||
publishDraw,
|
||||
geoImport,
|
||||
publishGeoImport,
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user