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

Fixed problem with "show usage" also in the static VISTOMS version

Former-commit-id: 1dc359aec25d3a3fa42b8d6a368532671b8d0eef
parent d1a4f9b4
No related branches found
No related tags found
No related merge requests found
Pipeline #192867 canceled
......@@ -19974,18 +19974,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);
}
})
})
}
})
......@@ -20006,18 +20011,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);
}
})
})
}
})
......@@ -20104,10 +20114,9 @@
childrenItems: []
}]
var graphs, currentGraph, varCategories, entireData;
var graphs, currentGraph, varCategories;
entireData = data;
graphs = entireData.graphs;
graphs = data.graphs;
for (var i=0;i<graphs.length;i++)
{
if (graphs[i].id==graphID)
......@@ -20115,8 +20124,8 @@
currentGraph = graphs[i]
}
}
varCategories = entireData.categories;
varCategories = data.categories;
//aigner: Get xdsm data
var mdo = currentGraph.xdsm;
......@@ -20645,8 +20654,6 @@
.on("mouseover", function(){circle.style("fill-opacity", .8);})
.on("mouseout", function(){circle.style("fill-opacity", .6)})
//TODO - aigner: on mouseover there should be a text box telling the options
d3gNode = d3gNode
.on("click", function()
{
//On mousedown, additional sub-workflows will be visualized
......@@ -20692,7 +20699,14 @@
})
d3gNode.append("svg:title").text("Click right to inspect");
d3gNode = d3gNode.on('mouseover', function(){d3.select(this).style("cursor", "pointer")});
d3gNode = d3gNode.on('contextmenu', d3.contextMenu(toolMenu))
if (this.__data__.name == "Coordinator")
{
d3gNode = d3gNode.on('contextmenu', d3.contextMenu(toolMenuCoor))
}
else
{
d3gNode = d3gNode.on('contextmenu', d3.contextMenu(toolMenu))
}
})
function prepareTreeLayout(xdsms, refName)
......@@ -21209,7 +21223,7 @@
return d.children || d._children ? "end" : "start";
})
//.text(function(d) { return d.data.text; });
//Function writeTreeToXML goes through tree nodes and puts the into an xml document
function writeTreeToXML(aNode,anXMLDoc,anXPath)
......@@ -21754,10 +21768,9 @@
//################################################################################################//
function startEdgeBundles(data, graphID)
{
var graphs, currentGraph, varCategories, entireData;
var graphs, currentGraph, varCategories;
entireData = data;
graphs = entireData.graphs;
graphs = data.graphs;
for (var i=0;i<graphs.length;i++)
{
if (graphs[i].id==graphID)
......@@ -21766,7 +21779,7 @@
}
}
varCategories = entireData.categories;
varCategories = data.categories;
var classes = currentGraph.edgeBundles;
//Highlight function, that shows usage of a node in the XDSM
......@@ -21802,15 +21815,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)
{
d3.select(p)
.style("stroke-opacity", 1.0)
if (include(p_name+"__",xPath_fromFirst+"__") || include(p_name,xPath_fromFirst+"/"))
{
highlight_on = true
}
})
if (highlight_on)
{
d3.select(p).style("stroke-opacity", 1.5)
}
else
{
......@@ -24835,25 +24855,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)
{
......@@ -26312,11 +26332,10 @@
//aigner: Here the data is read and the sankey diagram is created
//#####################################################################//
var graphs, currentGraph, varCategories, entireData;
var graphs, currentGraph, varCategories;
function startSankeyDiagram(data, graphID)
{
entireData = data;
graphs = entireData.graphs;
graphs = data.graphs;
for (var i=0;i<graphs.length;i++)
{
if (graphs[i].id==graphID)
......@@ -26324,7 +26343,7 @@
currentGraph = graphs[i]
}
}
varCategories = entireData.categories;
varCategories = data.categories;
//Highlight function, that shows usage of a node in the XDSM
function highlight(data)
......@@ -26334,8 +26353,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);
}
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