Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: tools/turbolizer/edge.js

Issue 2230313002: [turbolizer] Enlarge node labels and bubbles. Fix dead node display on old JSON. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@t-p2-base
Patch Set: Fix arrowheads. Fix dead nodes on old JSONs. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/turbolizer/graph-layout.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/turbolizer/edge.js
diff --git a/tools/turbolizer/edge.js b/tools/turbolizer/edge.js
index 7e46391df8cbd266b8ac7d49c51b37476594e856..c0f63a0204ffc088553bc63aafaaa8e5508b29a2 100644
--- a/tools/turbolizer/edge.js
+++ b/tools/turbolizer/edge.js
@@ -49,8 +49,10 @@ Edge.prototype.generatePath = function(graph) {
var target = this.target;
var source = this.source;
var input_x = target.x + target.getInputX(this.index);
+ var arrowheadHeight = 7;
+ var input_y = target.y - 2 * DEFAULT_NODE_BUBBLE_RADIUS - arrowheadHeight;
var output_x = source.x + source.getOutputX();
- var output_y = source.y + DEFAULT_NODE_HEIGHT + DEFAULT_NODE_BUBBLE_RADIUS;
+ var output_y = source.y + graph.getNodeHeight(source) + DEFAULT_NODE_BUBBLE_RADIUS;
var inputApproach = target.getInputApproach(this.index);
var outputApproach = source.getOutputApproach(graph);
var horizontalPos = this.getInputHorizontalPosition(graph);
@@ -68,7 +70,7 @@ Edge.prototype.generatePath = function(graph) {
}
result += "L" + input_x + "," + inputApproach +
- "L" + input_x + "," + (target.y - DEFAULT_NODE_BUBBLE_RADIUS - 12);
+ "L" + input_x + "," + input_y;
return result;
}
« no previous file with comments | « no previous file | tools/turbolizer/graph-layout.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698