give more control over options display
This commit is contained in:
+7
-3
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user