mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
feat(display): render the style parameters from the display store
VisualSettings publishes the active style's parameter rows to the display store, and the Display panel renders them with the shared row component; a moved slider goes back through the store's setStyleParameter action. The readout snaps a value to its step as the browser does, half-steps up and an off-grid maximum down. A preset that resets the shown style's uniforms republishes its rows, input for another style's parameters is ignored, and a stopped owner takes its rows with it unless a newer owner has published since. createStyleParameters is deprecated and builds its rows the same way.
This commit is contained in:
1 parent
3a750c9021
commit
c3c69a91cd
14 files changed
+316
-80
No files matched your search
@@ -72,6 +72,17 @@ export const useDisplayStore = defineStore('gev-display', () => {
|
||||
// buttons, the draw tool and the file import their own.
|
||||
const { connect, detach, act } = createOwners();
|
||||
|
||||
/**
|
||||
* The active style's parameter rows, `{style, rows}`; null while the style
|
||||
* has none. Each row's change calls act('setStyleParameter', name, value).
|
||||
*/
|
||||
const parameters = shallowRef(null);
|
||||
|
||||
/** @param {?{style: string, rows: object[]}} next */
|
||||
function publishParameters(next) {
|
||||
parameters.value = next && markRaw(next);
|
||||
}
|
||||
|
||||
/** The phone shell's tab bar; null until the shell first presents it. */
|
||||
const phoneShell = shallowRef(null);
|
||||
|
||||
@@ -91,6 +102,8 @@ export const useDisplayStore = defineStore('gev-display', () => {
|
||||
publishGeoImport,
|
||||
style,
|
||||
publishStyle,
|
||||
parameters,
|
||||
publishParameters,
|
||||
phoneShell,
|
||||
publishPhoneShell,
|
||||
mapSource,
|
||||
|
||||
Reference in new issue
Block a user