Skip to content

Commit

Permalink
partition filtered out
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Wicenec authored and Moritz Wicenec committed Feb 22, 2022
1 parent 10d8cb7 commit d3b9dfd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions daliuge-translator/dlg/dropmake/web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,35 @@ function drawGraphForDrops(g, drawGraph, data) {
var nodes = data['nodeDataArray'];
var links = data['linkDataArray']
console.log(nodes)
var nodes_dict = {};
for(var idx of nodes.keys()) {
var node = nodes[idx];
modified |= _addNode(g, node);
if (node.oid){
modified |= _addNode(g, node);
nodes_dict[node.key] = {node}
}
}

var time1 = new Date().getTime();
console.log('Took %d [ms] to create the nodes', (time1 - time0))

// #2: establish missing relationships
for(var idx of links.keys()) {
g.setEdge(nodes[links[idx]['from']]['oid'], nodes[links[idx]['to']]['oid'], {width: 40});
var findex = links[idx]['from']
var tindex = links[idx]['to']
g.setEdge(nodes_dict[findex].node.oid, nodes_dict[tindex].node.oid, {width: 40});
}
console.log(g)

if( modified ) {
drawGraph();
}

zoomFit()
}

function _addNode(g, node) {

console.log("adding node")

var TYPE_SHAPES= {Component:'rect', Data:'parallelogram'}

if( g.hasNode(g) ) {
Expand All @@ -114,6 +119,7 @@ function _addNode(g, node) {
html += '<span class="notes">' + notes + '</span>';
html += '<span style="font-size: 13px;">' + oid + '</span>';
html += "</div>";
console.log("setting")
g.setNode(oid, {
labelType: "html",
label: html,
Expand Down

0 comments on commit d3b9dfd

Please sign in to comment.