Skip to content
Snippets Groups Projects
Commit 42e3aa4a authored by baigner's avatar baigner
Browse files

List view works for all different kinds in XDSM now! EdgeBundles and Sankey will follow...

Former-commit-id: 3b7daa118d5cac521f5cc0b07f7537da03643a57
parent 366d7bc3
No related branches found
No related tags found
No related merge requests found
Pipeline #192838 canceled
......@@ -19816,8 +19816,6 @@
})
variables = JSON.parse(JSON.stringify(treeData))
prune_tree(pipeData,variables)
//aigner: HIER WEITER! evtl. treeData aufbauen (buildTree) um nodeMenu einfacher zu machen
variables.forEach(function(variable)
{
variable.name = variable.xPath
......@@ -19863,12 +19861,12 @@
var treeLayoutSVG = treeLayoutdiv.append("svg").attr("class","treeLayoutSVG")
var treeLayout = treeLayoutSVG.append("g").attr("class","treeLayout");
maketreeLayout(array, treeLayout, treeLayoutSVG, treeLayoutdiv, divClassName, headLine, varCategories[0].description);
show_bootBox_listMessage(title,functions,[]);
showList(title,functions,[]);
}
if (result.includes("List"))
{
show_bootBox_listMessage(title,variables,nodeMenu);
show_bootBox_listMessage(title,functions,[]);
showList(title,variables,nodeMenu);
showList(title,functions,[]);
}
}
}
......@@ -19881,7 +19879,7 @@
{
functions.push({name:graphElement,type:"function"})
})
show_bootBox_listMessage(title,functions,[])
showList(title,functions,[])
}
}
},
......@@ -21009,8 +21007,7 @@
//dataModelDiv.style("width", String(dropdown1.node().getBoundingClientRect().width+20)+"px")
//####################################################################################################################
//aigner: Hier weiter!!!
function show_bootBox_listMessage(aTitle,aList,aMenu)
function showList(aTitle,aList,aMenu)
{
if (aList.length != 0)
{
......@@ -21090,7 +21087,7 @@
variable.data.name = variable.xPath.split("/")[variable.xPath.split("/").length-1]
})
var title = "Here is a list"
show_bootBox_listMessage(title,variables,nodeMenu)
showList(title,variables,nodeMenu)
})
}
//aigner: Set width of the div, so the VISTOMS dropdown (in the top of the page) still works
......@@ -21256,22 +21253,83 @@
maketreeLayout(array, treeLayout, treeLayoutSVG, treeLayoutdiv, divClassName, headLine, aCategory);
}
//############################################################
//aigner: Creation of input/output list
//############################################################
function showIOList(aCategory, categoryDescr, aNode, io)
{
var edges = d3.selectAll(".edge");
var array="";
var name;
edges.each(function(edge)
{
if (io=="in")
{
name = "Input tree view: " + aNode.id + "; Categorization: " + categoryDescr;
if (edge.to == aNode.id)
{
array = array + "," + edge.name;
}
}
else if (io=="out")
{
name = "Output tree view:" + aNode.id + "; Categorization: " + categoryDescr;
if (edge.from == aNode.id)
{
array = array + "," + edge.name;
}
}
})
var variables = [];
var pipeData = array;
var title = "Here is a list"
variables = JSON.parse(JSON.stringify(currentGraph.variableSchemes[aCategory]))
prune_tree(pipeData,variables)
variables.forEach(function(variable)
{
variable.name = variable.xPath
//work around because nodeMenu expexts the data, to have a "data" object inside
variable.data = variable
variable.data.name = variable.xPath.split("/")[variable.xPath.split("/").length-1]
})
showList(title,variables,nodeMenu);
}
//############################################################
var inputChildrenitems = [];
var outputChildrenitems = [];
var inputChildrenitemsTree = [];
var outputChildrenitemsTree = [];
for (var j=0; j< varCategories.length; j++)
{
inputChildrenitems.push({title: 'according to ' + varCategories[j].description,
inputChildrenitemsTree.push({title: 'according to ' + varCategories[j].description,
varCategory: varCategories[j].name,
description: varCategories[j].description,
onMouseClick: function(elm, data, i) {showIOTree(data.varCategory,data.description,node,"in")},
onMouseOver: function(elm,data,i){}});
outputChildrenitems.push({title: 'according to ' + varCategories[j].description,
outputChildrenitemsTree.push({title: 'according to ' + varCategories[j].description,
varCategory: varCategories[j].name,
description: varCategories[j].description,
onMouseClick: function(elm, data, i) {showIOTree(data.varCategory,data.description,node,"out")},
onMouseOver: function(elm,data,i){}});
}
var inputChildrenitemsList = [];
var outputChildrenitemsList = [];
for (var j=0; j< varCategories.length; j++)
{
inputChildrenitemsList.push({title: 'according to ' + varCategories[j].description,
varCategory: varCategories[j].name,
description: varCategories[j].description,
onMouseClick: function(elm, data, i) {showIOList(data.varCategory,data.description,node,"out")},
onMouseOver: function(elm,data,i){}});
outputChildrenitemsList.push({title: 'according to ' + varCategories[j].description,
varCategory: varCategories[j].name,
description: varCategories[j].description,
onMouseClick: function(elm, data, i) {showIOList(data.varCategory,data.description,node,"out")},
onMouseOver: function(elm,data,i){}});
}
......@@ -21482,7 +21540,7 @@
},
onMouseOver: function(elm, d, i) {
},
childrenItems: inputChildrenitems
childrenItems: inputChildrenitemsTree
},
{
title: 'Show output variable tree...',
......@@ -21492,7 +21550,27 @@
},
onMouseOver: function(elm, d, i) {
},
childrenItems: outputChildrenitems
childrenItems: outputChildrenitemsTree
},
{
title: 'Show input variable list...',
onMouseDown: function(elm, k, i) {
},
onMouseUp: function(elm, k, i) {
},
onMouseOver: function(elm, d, i) {
},
childrenItems: inputChildrenitemsList
},
{
title: 'Show output variable list...',
onMouseDown: function(elm, k, i) {
},
onMouseUp: function(elm, k, i) {
},
onMouseOver: function(elm, d, i) {
},
childrenItems: outputChildrenitemsList
}
]
......@@ -21705,16 +21783,40 @@
}
xdsms[refName].svg.selectAll(".edge")
.each(function(d)
.each(function(edge)
{
//edgeMenu --> functions for right click options
var edgeChildrenItems = [];
var edgeChildrenItemsTree = [];
for (var j=0; j< varCategories.length; j++)
{
edgeChildrenItems.push({title: 'according to ' + varCategories[j].description,
edgeChildrenItemsTree.push({title: 'according to ' + varCategories[j].description,
varCategory: varCategories[j].name,
description: varCategories[j].description,
onMouseClick: function(elm, data, i) {showEdgeTree(d,data.varCategory,data.description)},
onMouseClick: function(elm, data, i) {showEdgeTree(edge,data.varCategory,data.description)},
onMouseOver: function(elm,data,i){}});
}
var edgeChildrenItemsList = [];
for (var j=0; j< varCategories.length; j++)
{
edgeChildrenItemsList.push({title: 'according to ' + varCategories[j].description,
varCategory: varCategories[j].name,
description: varCategories[j].description,
onMouseClick: function(elm, data, i) {
var variables = [];
var pipeData = edge.name;
var title = "Here is a list"
variables = JSON.parse(JSON.stringify(currentGraph.variableSchemes[data.varCategory]))
prune_tree(pipeData,variables)
variables.forEach(function(variable)
{
variable.name = variable.xPath
//work around because nodeMenu expexts the data, to have a "data" object inside
variable.data = variable
variable.data.name = variable.xPath.split("/")[variable.xPath.split("/").length-1]
})
showList(title,variables,nodeMenu);
},
onMouseOver: function(elm,data,i){}});
}
var theEdge = this;
......@@ -21722,7 +21824,7 @@
{
title: 'Show edge info',
onMouseDown: function(elm, k, i) {
showEdgeTable(d)
showEdgeTable(edge)
},
onMouseUp: function(elm, k, i) {
},
......@@ -21738,9 +21840,18 @@
},
onMouseOver: function(elm, d, i) {
},
childrenItems: edgeChildrenItems
}
,
childrenItems: edgeChildrenItemsTree
},
{
title: 'Show variable list...',
onMouseDown: function(elm, k, i) {
},
onMouseUp: function(elm, k, i) {
},
onMouseOver: function(elm, d, i) {
},
childrenItems: edgeChildrenItemsList
},
{
title: 'Delete a variable connection here...',
onMouseDown: function(elm, k, i) {
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