-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call graph is generated based on branch navigation changes #173
Open
hmir
wants to merge
6
commits into
master
Choose a base branch
from
CallGraphWithBranches
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
afa1440
call graph is generated based on branch navigation changes, clicking …
hmir 751fff0
call graph is generated in center of viewport, rubber banding on init…
hmir affb3be
added scale extent to call graph, call graph remains in center of vie…
hmir 4d4dd97
call graph now takes up the entirety of #seePanelBody, nodeSize decre…
hmir 04d59c5
increased efficiency when making queries within call graph, documente…
hmir b5d6468
call grpah changes on branch navigation change
hmir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
let rectWidth = 100, | ||
rectHeight = 40; | ||
|
@@ -139,11 +139,14 @@ export class CallGraph { | |
})) | ||
.append("g"); | ||
|
||
svg.attr("transform","translate(150,0)"); | ||
$(window).resize(function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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") | ||
|
@@ -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) { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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