Skip to content
Snippets Groups Projects
Commit 07006e24 authored by baigner's avatar baigner
Browse files

New data structure try 3: Started interpretation of new tree data in the html...

New data structure try 3: Started interpretation of new tree data in the html file (Not finished yet!!!)


Former-commit-id: e6f38ab671ffa26c5c809fda58e625808250e510
parent 411c5c73
No related branches found
No related tags found
No related merge requests found
...@@ -21451,9 +21451,7 @@ ...@@ -21451,9 +21451,7 @@
function maketreeLayout(pipeData, layout, svg, div, aName, aVarCategory) function maketreeLayout(pipeData, layout, svg, div, aName, aVarCategory)
{ {
var schema = currentGraph.variableSchemes[aVarCategory]; var schema = currentGraph.variableSchemes[aVarCategory];
console.log("schema")
console.log(schema)
var treeData = (JSON.parse(JSON.stringify(schema))); var treeData = (JSON.parse(JSON.stringify(schema)));
//aigner: Here, the minimalized tree is created! //aigner: Here, the minimalized tree is created!
...@@ -21463,21 +21461,32 @@ ...@@ -21463,21 +21461,32 @@
//3) xPathList --> Array of actually used pipeLine data //3) xPathList --> Array of actually used pipeLine data
//aigner:HIER WEITER!! //aigner:HIER WEITER!!
function appendElement(anElement, xPath_list)
function appendElement(anElement)
{ {
if (xPath_list.length > 1)
{
anElement.children = [];
var numberOfChildren = anElement.children.length;
var newChild = {};
anElement.children.append(newChild);
anElement.children.forEach(function(aChild)
}
{
}
} }
function buildTree(elements) function buildTree(elements)
{ {
elements.forEach(function(element) elements.forEach(function(element)
{ {
var xPath_split = element.xPath.split("/"); var xPath_split = element.xpath.split("/");
var index = xPath_split.indexOf(""); var index = xPath_split.indexOf("");
if (index > -1) {xPath_split.splice(index, 1);} if (index > -1) {xPath_split.splice(index, 1);}
console.log(element)
console.log(xPath_split) console.log(xPath_split)
appendElement(element, xPath_split)
}) })
} }
buildTree(treeData) buildTree(treeData)
...@@ -1541,7 +1541,7 @@ if __name__ == '__main__': ...@@ -1541,7 +1541,7 @@ if __name__ == '__main__':
args = sys.argv args = sys.argv
# Check if folder is given in args # Check if folder is given in args
if '-folder' in args: if '-folder' in args:
folder = args[args.index('-folder') + 1] folder = os.path.join(args[args.index('-folder') + 1],'')
assert isinstance(folder, basestring), 'Folder should be a string.' assert isinstance(folder, basestring), 'Folder should be a string.'
else: else:
folder = None folder = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment