Draft groups in layers menu
TODO: don't use Bootstrap's switches!!
This commit is contained in:
@@ -66,11 +66,11 @@ function traverseTree(node, flatList, depth = 1, inheritedColor = null) {
|
||||
* Create a flat list of nodes from
|
||||
* the nested structure in config
|
||||
* @param {Array} nodes
|
||||
* @returns {{flat: NormalizedSceneNode[], normNode: object}} A flat list of nodes
|
||||
* @returns {{flat: NormalizedSceneNode[], tree: NormalizedSceneNode[]}} A flat list of nodes
|
||||
**/
|
||||
export function normalizeNodes (nodes) {
|
||||
let flatList = [];
|
||||
const normNode = traverseTree(nodes, flatList);
|
||||
|
||||
return {flat: flatList, normNode};
|
||||
return {flat: flatList, tree: normNode.children};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user