give more control over options display

This commit is contained in:
axolotle
2021-06-29 16:49:23 +02:00
parent 5ab3715d19
commit 5a9e28f85e
4 changed files with 36 additions and 19 deletions
+7 -3
View File
@@ -14,9 +14,8 @@ import {
export default {
state: {
nodes: {},
history: [],
optionsVisible: true,
// IDS
ids: {
// depart: undefined,
@@ -83,6 +82,10 @@ export default {
for (const node of nodes) {
addNode(node, dataLevel)
}
},
'UPDATE_OPTIONS_VISIBILITY' (state, visible) {
state.optionsVisible = visible
}
},
@@ -140,6 +143,7 @@ export default {
allNodes: state => state.nodes,
// Args getters
nodes: state => ids => ids.map(id => state.nodes[id]),
node: state => id => state.nodes[id]
node: state => id => state.nodes[id],
optionsVisible: state => state.optionsVisible
}
}