Improvements
This commit is contained in:
1 parent
988309ccd1
commit
34570bfac6
4 files changed
+21
-4
No files matched your search
@@ -15,6 +15,7 @@ function newWorkspace() {
|
||||
save: saveWorkspace,
|
||||
backup: backupWorkspace,
|
||||
share: shareWorkspace,
|
||||
getProjectsHeads: getProjectsHeads,
|
||||
getHierarchyHeads: getHierarchyHeads,
|
||||
getHierarchyHeadsById: getHierarchyHeadsById,
|
||||
getHierarchyHeadsByType: getHierarchyHeadsByType,
|
||||
@@ -363,6 +364,20 @@ function newWorkspace() {
|
||||
return nodes
|
||||
}
|
||||
|
||||
function getProjectsHeads() {
|
||||
let nodes = []
|
||||
for (let i = 0; i < thisObject.workspaceNode.rootNodes.length; i++) {
|
||||
let rootNode = thisObject.workspaceNode.rootNodes[i]
|
||||
let nodeDefinition = getNodeDefinition(rootNode)
|
||||
if (nodeDefinition !== undefined) {
|
||||
if (nodeDefinition.isProjectHead === true) {
|
||||
nodes.push(rootNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nodes
|
||||
}
|
||||
|
||||
function getHierarchyHeadsById(nodeId) {
|
||||
let hiriatchyHeads = getHierarchyHeads()
|
||||
for (let i = 0; i < hiriatchyHeads.length; i++) {
|
||||
|
||||
Reference in new issue
Block a user