From 9ebef393df0abb93959bc4fce6647acf87ba29ec Mon Sep 17 00:00:00 2001 From: baigner <benedikt.aigner@rwth-aachen.de> Date: Fri, 20 Apr 2018 14:18:38 +0200 Subject: [PATCH] ....and still does not work entirely. Former-commit-id: 0a0adeb0137ff19500007a8d3a13b73aedd33423 --- kadmos/vistoms/templates/VISTOMS.html | 41 +++++++++++---------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/kadmos/vistoms/templates/VISTOMS.html b/kadmos/vistoms/templates/VISTOMS.html index de188bd14..730d62f80 100644 --- a/kadmos/vistoms/templates/VISTOMS.html +++ b/kadmos/vistoms/templates/VISTOMS.html @@ -18746,6 +18746,8 @@ //Highlight function, that shows usage of a node in the XDSM function highlight(data,aText) { + console.log(data) + console.log(aText) aText = "/"+data.data.name+aText; if (data.parent){highlight(data.parent,aText)} else @@ -20039,9 +20041,13 @@ 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 + //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] }) bootbox.prompt( @@ -20080,12 +20086,12 @@ var treeLayoutSVG = treeLayoutdiv.append("svg").attr("class","treeLayoutSVG") var treeLayout = treeLayoutSVG.append("g").attr("class","treeLayout"); maketreeLayout(array, treeLayout, treeLayoutSVG, treeLayoutdiv, headLine, varCategories[0].description); + show_bootBox_listMessage(functions,nodeMenu); } if (result.includes("List")) { - var list = [] - list = functions.concat(variables); - show_bootBox_listMessage(list); + show_bootBox_listMessage(variables,nodeMenu); + show_bootBox_listMessage(functions,nodeMenu); } } } @@ -20093,15 +20099,15 @@ } else { - var list = []; + var functions = []; graphElements.forEach(function(graphElement) { - list.push({name:graphElement,type:"function"}) + functions.push({name:graphElement,type:"function"}) }) - show_bootBox_listMessage(list) + show_bootBox_listMessage(functions,toolMenu) } - function show_bootBox_listMessage(aList) + function show_bootBox_listMessage(aList,aMenu) { if (aList.length != 0) { @@ -20127,20 +20133,8 @@ .selectAll('tr') .data(aList).enter() .append('tr') - var td = tr.append("td").html(function(d) { return d.name; }) - tr.on('contextmenu', d3.contextMenu(nodeMenu)); - <!-- aList.forEach(function(listElement) --> - <!-- { --> - <!-- var td = tr.append("td").text(listElement.name) --> - <!-- if (listElement.type=="variable") --> - <!-- { --> - <!-- tr.on('contextmenu', d3.contextMenu(nodeMenu)); --> - <!-- } --> - <!-- else if (listElement.type=="function") --> - <!-- { --> - <!-- tr.on("mousedown",function(){bootbox.alert("I'm a function!")}) --> - <!-- } --> - <!-- }) --> + var td = tr.append("td").html(function(d) { return d.xPath; }) + tr.on('contextmenu', d3.contextMenu(aMenu)); $('.myPanel').lobiPanel({ reload: false, editTitle: false, @@ -22372,10 +22366,7 @@ return d.children || d._children ? "end" : "start"; }) //.text(function(d) { return d.data.text; }); - - - - + nodeEnter = nodeEnter .on('contextmenu', d3.contextMenu(nodeMenu)); -- GitLab