diff --git a/kadmos/vistoms/templates/VISTOMS.html b/kadmos/vistoms/templates/VISTOMS.html index 230dfcb356b1635fa55947f1d8f2c3fe6d7b55cc..704c218157a5d2e19be2b25c1a2cd32437c2f218 100644 --- a/kadmos/vistoms/templates/VISTOMS.html +++ b/kadmos/vistoms/templates/VISTOMS.html @@ -18756,7 +18756,6 @@ //#####################################################################// function startXDSM(data, graphID) { - //Highlight function, that shows usage of a node in the XDSM function highlight(data) { @@ -18771,18 +18770,23 @@ xdsm_tmp.svg.selectAll(".edge").each(function(p) { var firstElement_tmp = p.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var this_edge = this + var p_name_list = p.name.split(",") + p_name_list.forEach(function(p_name) { - var highlightEdge = d3.select(this).select("polygon"); - highlightEdge - .style("stroke-width",5.) - .style("stroke","#CC0000") - d3.selectAll(".treeFrame") - .attr("fill-opacity", 0.5) - .attr("stroke-opacity", 0.5); - d3.selectAll(".nodeText").style("fill-opacity",0.5); - } + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + var highlightEdge = d3.select(this_edge).select("polygon"); + highlightEdge + .style("stroke-width",5.) + .style("stroke","#CC0000") + d3.selectAll(".treeFrame") + .attr("fill-opacity", 0.5) + .attr("stroke-opacity", 0.5); + d3.selectAll(".nodeText").style("fill-opacity",0.5); + } + }) }) } }) @@ -18803,18 +18807,23 @@ xdsm_tmp.svg.selectAll(".edge").each(function(p) { var firstElement_tmp = p.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var this_edge = this + var p_name_list = p.name.split(",") + p_name_list.forEach(function(p_name) { - var highlightEdge = d3.select(this).select("polygon"); - highlightEdge - .style("stroke-width",1.) - .style("stroke","black"); - d3.selectAll(".treeFrame") - .attr("fill-opacity", 0.8) - .attr("stroke-opacity", 0.8); - d3.selectAll(".nodeText").style("fill-opacity",1); - } + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + var highlightEdge = d3.select(this_edge).select("polygon"); + highlightEdge + .style("stroke-width",1.) + .style("stroke","black"); + d3.selectAll(".treeFrame") + .attr("fill-opacity", 0.8) + .attr("stroke-opacity", 0.8); + d3.selectAll(".nodeText").style("fill-opacity",1); + } + }) }) } }) @@ -23555,15 +23564,22 @@ aLink.__data__.name += aLink.__data__.pipeDataName_out } }) - - //var allLinks_tmp = allLinks[0]; + allLinks[0].forEach(function(p) { var firstElement_tmp = p.__data__.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.__data__.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var p_name_list = p.__data__.name.split(",") + var highlight_on = false + p_name_list.forEach(function(p_name) + { + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + highlight_on = true + } + }) + if (highlight_on) { - d3.select(p) - .style("stroke-opacity", 1.0) + d3.select(p).style("stroke-opacity", 1.5) } else { @@ -26588,25 +26604,25 @@ }); - //Highlight function, that shows usage of a node in the XDSM - function highlight(data) - { - xPath = data.xPath; - var allLinks = d3.selectAll(".link"); - var allLinks_tmp = allLinks[0]; - allLinks_tmp.forEach(function(p) { - var firstElement_tmp = p.__data__.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.__data__.name,text_fromFirst)) - { - d3.select(p).style("opacity", .8); - } - else - { - d3.select(p).style("opacity", 0); - } - }); - } + <!-- //Highlight function, that shows usage of a node in the XDSM --> + <!-- function highlight(data) --> + <!-- { --> + <!-- xPath = data.xPath; --> + <!-- var allLinks = d3.selectAll(".link"); --> + <!-- var allLinks_tmp = allLinks[0]; --> + <!-- allLinks_tmp.forEach(function(p) { --> + <!-- var firstElement_tmp = p.__data__.name.split("/")[1] --> + <!-- var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] --> + <!-- if (include(p.__data__.name,text_fromFirst)) --> + <!-- { --> + <!-- d3.select(p).style("opacity", .8); --> + <!-- } --> + <!-- else --> + <!-- { --> + <!-- d3.select(p).style("opacity", 0); --> + <!-- } --> + <!-- }); --> + <!-- } --> function showVariableTable(aVariable) { @@ -28086,8 +28102,17 @@ var allLinks_tmp = allLinks[0]; allLinks_tmp.forEach(function(p) { var firstElement_tmp = p.__data__.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.__data__.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var p_name_list = p.__data__.name.split(",") + var highlight_on = false + p_name_list.forEach(function(p_name) + { + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + highlight_on = true; + } + }) + if (highlight_on) { d3.select(p).style("opacity", .8); } diff --git a/kadmos/vistoms/templates/VISTOMS_sessions.html b/kadmos/vistoms/templates/VISTOMS_sessions.html index ab7c672da1d84cb15f77b372968779d12f8f40af..70762c897d557cc867abc046be9ec3d6abf4e398 100644 --- a/kadmos/vistoms/templates/VISTOMS_sessions.html +++ b/kadmos/vistoms/templates/VISTOMS_sessions.html @@ -18758,7 +18758,6 @@ //#####################################################################// function startXDSM(data, graphID) { - //Highlight function, that shows usage of a node in the XDSM function highlight(data) { @@ -18773,18 +18772,23 @@ xdsm_tmp.svg.selectAll(".edge").each(function(p) { var firstElement_tmp = p.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var this_edge = this + var p_name_list = p.name.split(",") + p_name_list.forEach(function(p_name) { - var highlightEdge = d3.select(this).select("polygon"); - highlightEdge - .style("stroke-width",5.) - .style("stroke","#CC0000") - d3.selectAll(".treeFrame") - .attr("fill-opacity", 0.5) - .attr("stroke-opacity", 0.5); - d3.selectAll(".nodeText").style("fill-opacity",0.5); - } + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + var highlightEdge = d3.select(this_edge).select("polygon"); + highlightEdge + .style("stroke-width",5.) + .style("stroke","#CC0000") + d3.selectAll(".treeFrame") + .attr("fill-opacity", 0.5) + .attr("stroke-opacity", 0.5); + d3.selectAll(".nodeText").style("fill-opacity",0.5); + } + }) }) } }) @@ -18805,18 +18809,23 @@ xdsm_tmp.svg.selectAll(".edge").each(function(p) { var firstElement_tmp = p.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var this_edge = this + var p_name_list = p.name.split(",") + p_name_list.forEach(function(p_name) { - var highlightEdge = d3.select(this).select("polygon"); - highlightEdge - .style("stroke-width",1.) - .style("stroke","black"); - d3.selectAll(".treeFrame") - .attr("fill-opacity", 0.8) - .attr("stroke-opacity", 0.8); - d3.selectAll(".nodeText").style("fill-opacity",1); - } + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + var highlightEdge = d3.select(this_edge).select("polygon"); + highlightEdge + .style("stroke-width",1.) + .style("stroke","black"); + d3.selectAll(".treeFrame") + .attr("fill-opacity", 0.8) + .attr("stroke-opacity", 0.8); + d3.selectAll(".nodeText").style("fill-opacity",1); + } + }) }) } }) @@ -23562,15 +23571,22 @@ aLink.__data__.name += aLink.__data__.pipeDataName_out } }) - - //var allLinks_tmp = allLinks[0]; + allLinks[0].forEach(function(p) { var firstElement_tmp = p.__data__.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.__data__.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var p_name_list = p.__data__.name.split(",") + var highlight_on = false + p_name_list.forEach(function(p_name) + { + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + highlight_on = true + } + }) + if (highlight_on) { - d3.select(p) - .style("stroke-opacity", 1.0) + d3.select(p).style("stroke-opacity", 1.5) } else { @@ -26595,25 +26611,25 @@ }); - //Highlight function, that shows usage of a node in the XDSM - function highlight(data) - { - xPath = data.xPath; - var allLinks = d3.selectAll(".link"); - var allLinks_tmp = allLinks[0]; - allLinks_tmp.forEach(function(p) { - var firstElement_tmp = p.__data__.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.__data__.name,text_fromFirst)) - { - d3.select(p).style("opacity", .8); - } - else - { - d3.select(p).style("opacity", 0); - } - }); - } + <!-- //Highlight function, that shows usage of a node in the XDSM --> + <!-- function highlight(data) --> + <!-- { --> + <!-- xPath = data.xPath; --> + <!-- var allLinks = d3.selectAll(".link"); --> + <!-- var allLinks_tmp = allLinks[0]; --> + <!-- allLinks_tmp.forEach(function(p) { --> + <!-- var firstElement_tmp = p.__data__.name.split("/")[1] --> + <!-- var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] --> + <!-- if (include(p.__data__.name,text_fromFirst)) --> + <!-- { --> + <!-- d3.select(p).style("opacity", .8); --> + <!-- } --> + <!-- else --> + <!-- { --> + <!-- d3.select(p).style("opacity", 0); --> + <!-- } --> + <!-- }); --> + <!-- } --> function showVariableTable(aVariable) { @@ -28093,8 +28109,17 @@ var allLinks_tmp = allLinks[0]; allLinks_tmp.forEach(function(p) { var firstElement_tmp = p.__data__.name.split("/")[1] - var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] - if (include(p.__data__.name,text_fromFirst)) + var xPath_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1] + var p_name_list = p.__data__.name.split(",") + var highlight_on = false + p_name_list.forEach(function(p_name) + { + if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/")) + { + highlight_on = true; + } + }) + if (highlight_on) { d3.select(p).style("opacity", .8); }