Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions src/visualization/call-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ export class CallGraph {

d3.select(divElement).html("");

let margin = {top: 20, right: 20, bottom: 30, left: 40},
width = 400 - margin.left - margin.right,
height = 250 - margin.top - margin.bottom;
let margin = {top: 20, right: 20, bottom: 30, left: 40};
let width = $("#right-splitter").width() - margin.left - margin.right;
let height = $(".tab-content").height() - 300 - margin.top - margin.bottom;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call graph height fills up nearly the entirety of "tab-content" heigh


let rectWidth = 100,
rectHeight = 40;
Expand All @@ -139,11 +139,14 @@ export class CallGraph {
}))
.append("g");

svg.attr("transform","translate(150,0)");
$(window).resize(function() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call graph resizes with window

d3.select(divElement).select("svg").attr("width", $("#right-splitter").width() - margin.left - margin.right);
d3.select(divElement).select("svg").attr("height", $(".tab-content").height() - 300 - margin.top - margin.bottom);
});

let root = d3.hierarchy(branches),
nodes = root.descendants(),
links = root.descendants().slice(1);
let root = d3.hierarchy(branches);
let nodes = root.descendants();
let links = root.descendants().slice(1);

tree(root);
let link = svg.selectAll(".link")
Expand Down Expand Up @@ -263,10 +266,11 @@ export class CallGraph {

updatePins();

svg.selectAll(".node").selectAll("*").attr("transform","translate(" + (width/2 - rectWidth/2) + ",5)");
svg.selectAll(".node").selectAll("text").attr("transform","translate(" + width/2 + ",5)");
svg.selectAll(".link").attr("transform","translate(" + width/2 + ",5)");
}

d3.select(self.frameElement).style("height", 200 + "px");

}

createBranchHierarchy(branches) {
Expand Down