diff --git a/kadmos/vistoms/templates/VISTOMS.html b/kadmos/vistoms/templates/VISTOMS.html index 45cb20735da0871aa6a8cd182e0664c7302d6045..1f6ec9120948ca876da40dbea7d9ce162f33184f 100644 --- a/kadmos/vistoms/templates/VISTOMS.html +++ b/kadmos/vistoms/templates/VISTOMS.html @@ -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) {